NWCloseSemaphore

Closes a semaphore and decrements the open count of the semaphore, indicating one less process is holding the semaphore open

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Synchronization

Syntax

  #include <nwsync.h> 
  or 
  #include <nwcalls.h> 
   
  N_EXTERN_LIBRARY( NWCCODE )NWCloseSemaphore  ( 
     NWCONN_HANDLE   conn,  
     nuint32         semHandle);
  

Delphi Syntax

  uses calwin32 
   
  Function NWCloseSemaphore 
    (conn : NWCONN_HANDLE; 
     semHandle : nuint32 
  ) : NWCCODE;
  

Parameters

conn
(IN) Specifies the NetWare® server connection handle.
semHandle
(IN) Specifies the semaphore handle obtained when the semaphore was opened by NWOpenSemaphore.

Return Values

These are common return values; see Return Values (NDK: Connection, Message, and NCP Extensions) for more information.

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x89FF

INVALID_SEMAPHORE_HANDLE, LOCK_ERROR

Remarks

If the requesting process is the last process to have this semaphore open, the semaphore is deleted.

NCP Calls

See Also

NWExamineSemaphore, NWOpenSemaphore, NWSignalSemaphore, NWWaitOnSemaphore