Apply/release a software semaphore
──────────────────────────────────────────────────────────────────────────────
Syntax
GT_UserLock( cMaster , lLock , cUserName )
Arguments:
cMaster - Master table to be locked/unlocked
lLock - If .T., lock the record, otherwise unlock the record
cUserName - Name of user applying lock
Returns:
The lock status - .T. if locked, .F. if not locked
Description:
Locking : The userid of the current user is placed in the field
"LOCKEDBY" in the given table. If the record is locked, or another
user has set the semaphore, .F. is returned. If the name is applied
.T. is returned
Unlocking : If the userid in the "LOCKEDBY" field matches the userid
of the current user the lock is released, otherwise an error is
flagged and .F. returned
Examples:
Header File: GT_LIB.CH
Source: USERLOCK.PRG
Author: Martin Colloby