pszName (PSZ) - input

      A pointer to the ASCIIZ name of the semaphore.

      Semaphore names are validated by the file system, and must include the prefix \SEM32\. A maximum of 255 characters is allowed. If these requirements are not met, ERROR_INVALID_NAME is returned. If the semaphore already exists, ERROR_DUPLICATE_NAME is returned.

      If this field is null, the muxwait semaphore is unnamed. Unnamed semaphores can be either private or shared, depending on flAttr. They are identified by the semaphore handle that phmux points to.

      By default, named semaphores are shared.

    phmux (PHMUX) - output

      A pointer to the handle of the muxwait semaphore.

    cSemRec (ULONG) - input

      The count of semaphore record entries in pSemRec.

    pSemRec (PSEMRECORD) - input

      A pointer to the array of semaphore record entries to put into the muxwait semaphore.

      This is the list of event or mutex semaphores that must be posted or released in order for the muxwait semaphore to clear.

    flAttr (ULONG) - input

      A set of flags that specify the attributes of the semaphore.

      The attributes of the semaphore are a combination of the following values:

    • DC_SEM_SHARED The semaphore is shared when this bit is set; otherwise, it is a private semaphore. This bit is checked only if the semaphore is unnamed (that is, if pszName is null), because all named semaphores are shared.

    • DCMW_WAIT_ANY.
      The semaphore clears when any event semaphore in its pSemRec list is posted, or when any mutex semaphore in its pSemRec list is released. When any one of the semaphores is cleared, the thread waiting for the muxwait semaphore can continue execution.

    • DCMW_WAIT_ALL
      The semaphore clears when all of the event semaphores in its pSemRec list have been posted, or when all of the mutex semaphores in its pSemRec list have been released. When all of the semaphores are cleared, the thread waiting for the muxwait semaphore can continue execution.

    ulrc (APIRET) - returns

      Return Code.

      DosCreateMuxWaitSem returns one of the following values:

    • NO_ERROR 6
        ERROR_INVALID_HANDLE
      8
        ERROR_NOT_ENOUGH_MEMORY
      87
        ERROR_INVALID_PARAMETER
      100
        ERROR_TOO_MANY_SEMAPHORES
      105
        ERROR_SEM_OWNER_DIED
      123
        ERROR_INVALID_NAME
      284
        ERROR_DUPLICATE_HANDLE
      285
        ERROR_DUPLICATE_NAME
      290
        ERROR_TOO_MANY_HANDLES
      292
        ERROR_WRONG_TYPE
      For a full list of error codes, see Errors.


    [Back] [Next]