Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#amunits]

GetDeviceProc

Finds a handler to send a message to

Declaration

Source position: amigados.pas line 1655

function GetDeviceProc(

  const name: pCHAR;

  dp: pDevProc

):pDevProc;

function GetDeviceProc(

  const name: string;

  dp: pDevProc

):pDevProc;

Arguments

name

  

name of the object you wish to access. This can be a relative path ('foo/bar'), relative to the current volume (':foo/bar'), or relative to a device/volume/assign ('foo:bar').

dp

  

A value returned by GetDeviceProc() before, or nil

Function result

a pointer to a DevProc structure or nil

Arguments

name

  

name of the object you wish to access. This can be a relative path ('foo/bar'), relative to the current volume (':foo/bar'), or relative to a device/volume/assign ('foo:bar').

dp

  

A value returned by GetDeviceProc() before, or nil

Description

Finds the handler/filesystem to send packets regarding name to. This may involve getting temporary locks. It returns a structure that includes a lock and msgport to send to to attempt your operation. It also includes information on how to handle multiple-directory assigns (by passing the DevProc back to GetDeviceProc() until it returns nil).

The initial call to GetDeviceProc() should pass nil for devproc. If after using the returned DevProc, you get an ERROR_OBJECT_NOT_FOUND, and (TDevProc and DVPF_ASSIGN) is True, you should call GetDeviceProc() again, passing it the devproc structure. It will either return a modified devproc structure, or nil (with ERROR_NO_MORE_ENTRIES in IoErr()). Continue until it returns nil.

This call also increments the counter that locks a handler/fs into memory. After calling FreeDeviceProc(), do not use the port or lock again!

See also

FreeDeviceProc

  

Releases port returned by GetDeviceProc()

AssignLock

  

Creates an assignment to a locked object

AssignLate

  

Creates an assignment to a specified path later

AssignPath

  

Creates an assignment to a specified path


Documentation generated on: 2021-07-30