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

AssignLock

Creates an assignment to a locked object

Declaration

Source position: amigados.pas line 1588

function AssignLock(

  const name: pCHAR;

  lock: LongInt

):LongBool;

function AssignLock(

  const name: string;

  lock: LongInt

):Boolean;

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.

Arguments

name

  

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

lock

  

Lock associated with the assigned name

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