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

AssignLock

Creates an assignment to a locked object

Declaration

Source position: amigados.pas line 2303

function AssignLock(

  const Name: PChar;

  Lock: Pointer

):LongBool;

Arguments

Name

  

Name of device to assign lock to (without trailing ':')

Lock

  

Lock associated with the assigned name

Function result

On failure, the lock is not unlocked. IoErr() gives more information.

Description

Sets up an assign of a name to a given lock. Passing nil for a lock cancels any outstanding assign to that name. If an assign entry of that name is already on the list, this routine replaces that entry. If an entry is on the list that conflicts with the new assign, then a failure code is returned.

NOTE: you should not use the lock in any way after making this call successfully. It becomes the part of the assign, and will be unlocked by the system when the assign is removed. If you need to keep the lock, pass a lock from DupLock() to AssignLock().

See also

Lock

  

Lock a directory or file

AssignAdd

  

Adds a lock to an assign for multi-directory assigns

AssignPath

  

Creates an assignment to a specified path

AssignLate

  

Creates an assignment to a specified path later

DupLock

  

Duplicate a lock

RemAssignList

  

Remove an entry from a multi-dir assign


Documentation generated on: 2021-07-30