Apply/release a software semaphore
──────────────────────────────────────────────────────────────────────────────

Syntax

H_UserLock( cMaster , lLock )

Arguments:

cMaster - Master table to be locked/unlocked
lLock - If .T., lock the record, otherwise unlock the record

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: H_LIB52.CH

Source: USERLOCK.PRG

Author: Martin Colloby