## Printer Device Driver

[prev][next][parent][TOC]

### GplSemRequestMutexSem

Description

This call is used to request an OS/2 PM MUTEX semaphore.

Format

    APIRET APIENTRY GplSemRequestMutexSem( PMTXSEM  pmtxsem,

                                           LONG     lTime );

Parameters

pmtxsem (PMTXSEM) Address of MTXSEM structure.

lTime (LONG) Time out value in milliseconds.

Returns

Success NO_ERROR

Failure Typical error returns for this function include ERROR_INVALID_ PARAMETER or return codes from DosRequestMutexSem.

ERROR_TIMEOUT (RC 640d) means that the semaphore is owned.

Notes

The caller can specify the timeout value for the request. When timeout is 0 , the call returns immediately. When timeout is -1, the call is an indefinite wait. Otherwise the call will block up to the timeout specified.