Creates an assignment to a locked object
Source position: amigados.pas line 2303
function AssignLock( |
const Name: PChar; |
Lock: Pointer |
):LongBool; |
Name |
|
Name of device to assign lock to (without trailing ':') |
Lock |
|
Lock associated with the assigned name |
On failure, the lock is not unlocked. IoErr() gives more information.
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().
|
Lock a directory or file |
|
|
Adds a lock to an assign for multi-directory assigns |
|
|
Creates an assignment to a specified path |
|
|
Creates an assignment to a specified path later |
|
|
Duplicate a lock |
|
|
Remove an entry from a multi-dir assign |