Simulation support:
None. This function is mandatory for all drivers.
Description:
GreLockDevice locks a device for use by a single thread.
This function must be supported by all presentation drivers. GreLockDevice prevents two separate processes from accessing the resource (device context) at the same time. Hardcopy drivers need do nothing except return TRUE (Successful).
#define INCL_GRE_DEVMISC3 #include <os2.h> HDC hdc; /* Device context handle. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreLockDevice. */ BOOL rc; /* Return Code. */ rc = GreLockDevice(hdc, pInstance, lFunction);