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> semclose()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SemClose()
------------------------------------------------------------------------------
 Purpose:
 Close a semaphore.

 Syntax:
 bResult = SemClose( dwSemID )

 Parameters:
 dwSemID The semaphore ID number.

 Returns:
 A boolean value (TRUE or FALSE).

 The CA-Clipper name for this function is:
 SemClose()

 Description:
 SemClose() returns TRUE if the semaphore specified by ID number dwSemID
 is closed successfully.

 Returns FALSE if an error occurs.

 Example:
 // To open and close a semaphore called "UPDATE_SEM":
 dwSemID = SemOpen( "UPDATE_SEM", 1 )
 if ( NWErrorGet() = 0 )
    ....   // Perform function
    if ( SemClose( dwSemID ) )
       ? "Semaphore closed successfully"
    endif
 endif

 Notes:
 All semaphores opened by a program are automatically closed when
 the program terminates.

 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() SemUserGet() SemValueGet()

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