pszName (PSZ) - input

      A pointer to the ASCIIZ name of the semaphore to open.

      This field is null if the semaphore is either an unnamed, shared event semaphore or a private event semaphore (private semaphores are always unnamed). An unnamed event semaphore is identified by the pointer to the event semaphore handle (phev). If this field is not null, then the semaphore is a named shared semaphore, and phev must be set to zero.

    phev (PHEV) - in/out

      A pointer to the event-semaphore handle.

      Input

        A pointer to the event-semaphore handle to open if pszName is null. If pszName is not null, set phev to zero.
      Output
        A pointer to the event-semaphore handle that was opened.

      ulrc (APIRET) - returns

        Return Code.

        DosOpenEventSem returns one of the following values:

      • NO_ERROR 6
          ERROR_INVALID_HANDLE
        8
          ERROR_NOT_ENOUGH_MEMORY
        87
          ERROR_INVALID_PARAMETER
        123
          INVALID_NAME
        187
          ERROR_SEM_NOT_FOUND
        291
          ERROR_TOO_MANY_OPENS
        For a full list of error codes, see Errors.


      [Back] [Next]