Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>apply/release a software semaphore</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Apply/release a software semaphore
------------------------------------------------------------------------------

 Syntax

        GT_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: GT_LIB.CH

 Source: USERLOCK.PRG

 Author:  Martin Colloby

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson