## Printer Device Driver

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

### GplSemQueryMutexSem

Description

This call returns information about the semaphore.

Format

    APIRET APIENTRY GplSemQueryMutexSem( PMTXSEM  pmtxsem,

                                         PID      *ppid,

                                         TID      *ptid,

                                         PULONG   pulCount );

Parameters

pmtxsem (PMTXSEM) Address of MTXSEM structure.

*ppid (PPID) Address where process ID is returned.

*ptid (PTID) Address where thread ID is returned.

pulCount (PULONG) Request count.

Returns

Success NO_ERROR
Failure ERROR_INVALID_PARAMETER
or the return codes from:
DosQueryMutexSem

Notes

This API will return information about the semaphore, such as what process and thread currently owns it, and if owned, what is the nested use count.

It is important for asynchronously killed threads to make this call to determine if they own the DC semaphore. If they own the semaphore, they should release it the appropriate number of times before exiting.