NWExamineSemaphore
Returns the semaphore value
#include <nwsync.h> or #include <nwcalls.h> N_EXTERN_LIBRARY( NWCCODE )NWExamineSemaphore ( NWCONN_HANDLE conn, nuint32 semHandle, pnint16 semValue, pnuint16 semOpenCount);
uses calwin32 Function NWExamineSemaphore (conn : NWCONN_HANDLE; semHandle : nuint32; semValue : pnint16; semOpenCount : pnuint16 ) : NWCCODE;
These are common return values; see Return Values (NDK: Connection, Message, and NCP Extensions) for more information.
A semaphore value greater than 0 indicates the application can access the associated network resource. A negative value indicates the number of processes waiting to use the semaphore. If the semaphore value is negative, the application must either enter a waiting queue by calling NWWaitOnSemaphore or temporarily abandon its attempt to access the network resource.
semOpenCount indicates the number of processes holding the semaphore open. NWOpenSemaphore increments this value. NWCloseSemaphore decrements this value.
semValue is optional. Use NULL if a return value is not desired.