DosPostEventSem

Syntax
DosPostEventSem( hevSemaphore )

Parameters

 * HEV hevSemaphore (input):The handle of the semaphore to be posted.

Returns

 * APIRET rc:The following values can be returned:

Usage Explanation
DosPostEventSem increments, by one (1), the post count of the event semaphore referred to by hevSemaphore. If the semaphore has already been posted since the last reset, ERROR_ALREADY_POSTED is returned. This is not fatal and the post count is still incremented.

Gotchas
The process calling DosPostEventSem 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;     /* MySemaphore handle */

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

/* process becomes owner of semaphore */ /* by way of successful call to DosRequestEventSem */

rc = DosPostEventSem(hevMySemaphore);

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