[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'Exec' (#aros)

OpenDevice

Open a device for use

Declaration

Source position: exec.pas line 1282

function OpenDevice(

  const DevName: STRPTR;

  UnitNumber: ULONG;

  IORequest: PIORequest;

  Flags: ULONG

):LongInt;

Arguments

DevName

  

Requested device name

IORequest

  

The I/O request block to be returned with appropriate fields initialized.

Flags

  

An additional driver specific information. This is sometimes used to request opening a device with exclusive access.

Function result

Returns a sign-extended copy of the io_Error field of the IORequest. Zero if successful, else an error code is returned.

Description

This function opens the named device/unit and initializes the given I/O request block. Specific documentation on opening procedures may come with certain devices.

The device may exist in memory, or on disk; this is transparent to the OpenDevice caller.

A full path name for the device name is legitimate. For example "test:devs/fred.device". This allows the use of custom devices without requiring the user to copy the device into the system's DEVS: directory.

See also

CloseDevice

  

Close access to a device.

DoIO

  

Perform an I/O request and wait for its finish

SendIO

  

Initiate an I/O command

CheckIO

  

Check status on an I/O request

AbortIO

  

Attempt to abort an in-progress I/O request

WaitIO

  

Wait for completion of an I/O request


Documentation generated on: 2017-01-10