Simulation support:
None. This function is mandatory for all drivers.
Description:
GreQueryDevResource indicates whether a specified resource is available. If the resource is loaded, its handle is returned so that it can be selected into the device context.
This function must be supported by the display drivers, which must support the full range of requests. GreQueryDevResource is used internally by the graphics engine. Hardcopy drivers are required to provide a minimal level of support. At a minimum, the hardcopy driver must return 0 to indicate that a requested resource is not available. If a hardcopy driver has a raster or outline font that it requests the graphics engine to use as the default, then the presentation driver must return the address of its raster or outline font when the parameter id is equal to RT_FONT.
#define INCL_GRE_DEVICE #include <os2.h> HDC hdc; /* Device context handle. */ ULONG lType; /* Resource type. */ ULONG id; /* Defined resource value. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreQueryDevResource. */ LONG rc; /* Return Code. */ rc = GreQueryDevResource(hdc, lType, id, pInstance, lFunction);