DosQueryEventSem

DosQueryEventSem returns the post count of the Event semaphore referred to by hevSemaphore.

Syntax
rc = DosQueryEventSem( hevSemaphore,                        pulPostCount );

Parameters

 * HEV hevSemaphore (input):The handle (HEV) of the semaphore to be queried.
 * PUL pulPostCount (output):A pointer to the ULONG that is to get the post count of the queried event semaphore. The post count is the number of DosPostEventSem calls that have been issued for the event semaphore described by hevSemaphore.

Returns

 * APIRET rc:The following values can be returned:

Include Info

 * 1) define INCL_DOSSEMAPHORES
 * 2) include 

Gotchas
The process calling DosQueryEventSem must first obtain access to the semaphore in question or ERROR_INVALID_HANDLE will be returned.

Sample Code

 * 1) define INCL_DOSSEMAPHORES
 * 2) include 

HEV  hevMySemaphore;      /* my semaphore handle */ ULONG ulRequestCount;     /* will get the request count for the sem */

/* access is gained to the semaphore in question */ /* either by DosCreateEventSem ... */	/* ... or by DosOpenEventSem */ /* its handle is placed in hevMySemaphore */

rc = DosQueryEventSem(hevMySemaphore,	                     &ulRequestCount);

if (rc != 0) {	 /* We got an error to take care of. */	}