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 mutex semaphore or a private mutex semaphore (private semaphores are always unnamed). An unnamed mutex semaphore is identified by the pointer to the mutex-semaphore handle (phmtx) If this field is not null, the semaphore is a named shared semaphore, and phmtx must be set to zero before the call is made.

    phmtx (PHMTX) - in/out

      Pointer to a mutex-semaphore handle.

      Input

        A pointer to the mutex-semaphore handle to open if pszName is null; otherwise, this field is set to zero.
      Output
        A pointer to the mutex-semaphore handle that was opened.

      ulrc (APIRET) - returns

        Return Code.

        DosOpenMutexSem returns one of the following values:

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


      [Back] [Next]