pszName (PSZ) - input
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 semaphore is unnamed. Unnamed event semaphores can be either private or shared, depending on flAttr. They are identified by the semaphore handle that phev points to.
By default, all named semaphores are shared.
phev (PHEV) - output
flAttr (ULONG) - input
If the DC_SEM_SHARED bit is set, the semaphore is shared. Otherwise, this flag should be set to 0L. This bit is checked only if the semaphore is unnamed (that is, if pszName is null), because all named semaphores are shared.
fState (BOOL32) - input
Possible values are defined in the list below:
ulrc (APIRET) - returns
DosCreateEventSem returns one of the following values: