DDIHookProc

[This is preliminary documentation and subject to change.]

Application-defined callback function called by GDI when a display device interface (DDI) function is called. This is a function prototype for conceptual presentation; actual callback functions in your code would accept the same parameters and return a DWORD value, but need not have an identical label.

DWORD CALLBACK DDIHookProc(
  HDDI hddi,
  LONG lPrivateData,
  DDITYPE ddiType,
  LPDDIPARAMS lpDDIStruct
);
 

Parameters

hddi
Handle to a DDI hook function.
lPrivateData
A 32-bit value associated with this callback function. You set this value in the previous call to the SetDDIHook function.
ddiType
DDI function type value identifying the DDI function being called. This parameter can be one of the following values. For information on the functions and structures identified by this parameter, see the Windows 95 Device Driver Kit (DDK).
Value Meaning
DDI_BITBLT The DDI function being called is BitBlt and the lpDDIStruct parameter specifies the address of a BITBLT_DDIPARAMS structure.
DDI_BITMAPBITS The DDI function being called is BitmapBits and lpDDIStruct specifies the address of a BITMAPBITS_DDIPARAMS structure.
DDI_COLORINFO The DDI function being called is ColorInfo and lpDDIStruct specifies the address of a COLORINFO_DDIPARAMS structure.
DDI_CONTROL The DDI function being called is Control and lpDDIStruct specifies the address of a CONTROL_DDIPARAMS structure.
DDI_CREATEDIBITMAP The DDI function being called is CreateDIBitmap and lpDDIStruct specifies the address of a CREATEDIBITMAP_DDIPARAMS structure.
DDI_DEVICEBITMAP The DDI function being called is DeviceBitmap and lpDDIStruct specifies the address of a DEVICEBITMAP_DDIPARAMS structure.
DDI_DEVICEMODE The DDI function being called is DeviceMode and lpDDIStruct specifies the address of a DEVICEMODE_DDIPARAMS structure.
DDI_DIBBLT The DDI function being called is DeviceBitmapBits and lpDDIStruct specifies the address of a DIBBLT_DDIPARAMS structure.
DDI_DIBTODEVICE The DDI function being called is SetDIBitsToDevice and lpDDIStruct specifies the address of a DIBTODEVICE_DDIPARAMS structure.
DDI_DISABLE The DDI function being called is Disable and lpDDIStruct specifies the address of a DISABLE_DDIPARAMS structure.
DDI_ENABLE The DDI function being called is Enable and lpDDIStruct specifies the address of an ENABLE_DDIPARAMS structure.
DDI_ENUMDEVICEFONTS The DDI function being called is EnumDFonts and lpDDIStruct specifies the address of an ENUMDEVICEFONTS_DDIPARAMS structure.
DDI_ENUMOBJECTS The DDI function being called is EnumObj and lpDDIStruct specifies the address of an ENUMOBJECTS_DDIPARAMS structure.
DDI_EXTTEXTOUT The DDI function being called is ExtTextOut and lpDDIStruct specifies the address of an EXTTEXTOUT_DDIPARAMS structure.
DDI_FASTBORDER The DDI function being called is FastBorder and lpDDIStruct specifies the address of a FASTBORDER_DDIPARAMS structure.
DDI_GETCHARWIDTH The DDI function being called is GetCharWidth and lpDDIStruct specifies the address of a GETCHARWIDTH_DDIPARAMS structure.
DDI_GETPALETTE The DDI function being called is GetPalette and lpDDIStruct specifies the address of a GETSETPALETTE_DDIPARAMS structure.
DDI_GETPALETTETRANSLATE The DDI function being called is GetPalTrans and lpDDIStruct specifies the address of a GETSETPALETTETRANSLATE_DDIPARAMS structure.
DDI_OUTPUT The DDI function being called is Output and lpDDIStruct specifies the address of an OUTPUT_DDIPARAMS structure.
DDI_PIXEL The DDI function being called is Pixel and lpDDIStruct specifies the address of a PIXEL_DDIPARAMS structure.
DDI_REALIZEOBJECT The DDI function being called is RealizeObject and lpDDIStruct specifies the address of a REALIZEOBJECT_DDIPARAMS structure.
DDI_SCANLEFTRIGHT The DDI function being called is ScanLR and lpDDIStruct specifies the address of a SCANLEFTRIGHT_DDIPARAMS structure.
DDI_SELECTBITMAP The DDI function being called is SelectBitmap and lpDDIStruct specifies the address of a SELECTBITMAP_DDIPARAMS structure.
DDI_SETATTRIBUTE The DDI function being called is SetAttribute and lpDDIStruct specifies the address of a SETATTRIBUTE_DDIPARAMS structure.
DDI_SETPALETTE The DDI function being called is SetPalette and lpDDIStruct specifies the address of a GETSETPALETTE_DDIPARAMS structure
DDI_SETPALETTETRANSLATE The DDI function being called is SetPalTrans and lpDDIStruct specifies the address of a GETSETPALETTETRANSLATE_DDIPARAMS structure.
DDI_STRETCHBLT The DDI function being called is StretchBlt and lpDDIStruct specifies the address of a STRETCHBLT_DDIPARAMS structure.
DDI_STRETCHDIBITS The DDI function being called is StretchDIBits and lpDDIStruct specifies the address of a STRETCHDIBITS_DDIPARAMS structure.
DDI_STRINGBLT The DDI function being called is StrBlt and lpDDIStruct specifies the address of a STRINGBLT_DDIPARAMS structure.
DDI_UPDATECOLORS The DDI function being called is UpdateColors and lpDDIStruct specifies the address of an UPDATECOLORS_DDIPARAMS structure.

lpDDIStruct
Address of a DDI stack function structure, as defined in the winddi.h header file. This address exists within the stack; the structure is provided to allow applications to easily modify values if needed.

Note You must write this callback procedure in a 16-bit DLL.

Return Values

Returns a DWORD value specific to the DDI call being made. The CallNextDDI function generates this value.