Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> semusrget()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SemUsrGet()
------------------------------------------------------------------------------
 Purpose:
 Get the total number of users with a semaphore open.

 Syntax:
 iUserNum = SemUsrGet( dwSemID )

 Parameters:
 dwSemID The semaphore ID number.

 Returns:
 A numeric value (signed short int).

 Description:
 SemUsrGet() returns the number of workstations (including the requesting
 workstation) which currently have the semaphore specified by ID number
 dwSemID open.

 Returns NOVERRINT if an error occurs.

 Example:
 T// o open a semaphore called "UPDATE_SEM" and display the number of
 // workstations which have that semaphore open:
 dwSemID = SemOpen( "UPDATE_SEM", 1 )
 if ( NWErrorGet() = 0 )
    iCount = SemUsrGet( dwSemID )
    if ( iCount != NOVERRINT )
       ? iCount, "users currently have the semaphore open"
    endif
 endif

 Notes:
 Note for CA-Clipper:

 IMPORTANT - both positive and negative values are valid semaphore handles,
 except the value NOVERRLONG. Valid semaphore handles can be in the range
 -2147483647 to +2147483647.

See Also: SemOpen() SemClose() SemValGet()

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