GetDriverInfo: Difference between revisions
mNo edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
;hEngObject (ULONG) - input:Handle of a DC or bit map. | ;''hEngObject'' ([[ULONG]]) - input:Handle of a DC or bit map. | ||
;ulIndex (ULONG) - input:Has the following settings: | ;''ulIndex'' (ULONG) - input:Has the following settings: | ||
::Index=0 hEngObject is a DC handle | ::Index=0 hEngObject is a DC handle | ||
::Index=1 hEngObject is a bit-map handle | ::Index=1 hEngObject is a bit-map handle | ||
;hdc (HDC) - input:Device context handle, which identifies the calling DC. | ;''hdc'' ([[HDC]]) - input:Device context handle, which identifies the calling DC. | ||
==Return Code== | ==Return Code== | ||
;rc (LONG) - returns : Return codes. | ;''rc'' ([[LONG]]) - returns : Return codes. | ||
:If successful, the function returns the instance pointer associated with the object DC or the presentation driver's handle to the object bit map. If an error is detected, the function returns GPI_ALTERROR. | :If successful, the function returns the instance pointer associated with the object DC or the presentation driver's handle to the object bit map. If an error is detected, the function returns GPI_ALTERROR. | ||
Latest revision as of 19:27, 19 May 2025
This function returns a driver object handle for the engine object identified by hEngObject.
Syntax
GetDriverInfo(hEngObject, ulIndex, hdc)
Parameters
- hEngObject (ULONG) - input
- Handle of a DC or bit map.
- ulIndex (ULONG) - input
- Has the following settings:
- Index=0 hEngObject is a DC handle
- Index=1 hEngObject is a bit-map handle
- hdc (HDC) - input
- Device context handle, which identifies the calling DC.
Return Code
- rc (LONG) - returns
- Return codes.
- If successful, the function returns the instance pointer associated with the object DC or the presentation driver's handle to the object bit map. If an error is detected, the function returns GPI_ALTERROR.
Remarks
The parameter hEngObject can be a DC handle or an engine bit-map handle (for example, the source handle, which would be passed to the presentation driver's GreBitblt routine). If hEngObject is a DC, the return code is a pointer (pInstance) to the instance data of that DC. If hEngObject is a bit map, the return code is the driver's handle for the bit map (that is the handle returned to the presentation driver when the bit map was created).
GetDriverInfo includes a check to ensure that the object is, or was created by, an instance of a DC for the same device as the DC identified by hdc. If the check is not successful, the function returns GPI_ALTERROR. GetDriverInfo is exported by the graphics engine at ordinal 30 and, if the presentation driver wants to call this function, it must be imported by the driver's module definition file.