DosCreateMuxWaitSem

DosCreateMuxWaitSem creates a private or shared MuxWait semaphore. The usage count is incremented to 1. The process creating the semaphore does not need to open it also.

Syntax
rc = DosCreateMuxWaitSem( pszSemaphoreName,                            phmuxSemaphore,                            ulNumberOfRecords,                            pSemaphoreRecord,                            ulfAttributes );

Parameters
DC_SEM_SHARED, DCMW_WAIT_ANY and DCMW_WAIT_ALL.
 * PSZ pszSemaphoreName (input):This is a pointer to the null-terminated string containing the semaphore name. Any named semaphore is considered shared. An unnamed semaphore will be created with pszSemaphoreName set to NULL. The name of a semaphore must be prefixed by \SEM32\, cannot be longer than 255 characters and must conform to the naming conventions of the file system.
 * PHMUX phmuxSemaphore (output):This is a pointer to the HMUX that will get the handle to the new semaphore.
 * ULONG ulNumberOfRecords (input):This is the number of records that are pointed to by pSemaphoreRecord. 64 is the maximum number of records allowable in a muxwait list.
 * PSEMRECORD pSemaphoreRecord (input):This points to an array of SEMRECORD structures that are to be added to the muxwait list.
 * ULONG ulfAttributes (input):This contains the attribute flags relevant to the creation of the semaphore. As of this writing three values may be set for ulAttributeFlags, they are
 * ulAttributeFlags is checked for DC_SEM_SHARED value only if pszSemaphoreName is NULL. If ulAttributeFlags equals DC_SEM_SHARED then the semaphore is considered an unnamed, shared semaphore.
 * DCMW_WAIT_ANY indicates the semaphore is to unblock if any of the semaphores in the muxwait list post (event semaphore) or release (mutex semaphore).
 * DCMW_WAIT_ALL indicates the semaphore is to unblock only if all of the semaphores in the muxwait list post (event semaphore) or release (mutex semaphore).

Returns
APIRET rc The following values can be returned