SetDDIHook

[This is preliminary documentation and subject to change.]

Sets a hook into the DDI stream.

WINDDIAPI HDDI WINAPI SetDDIHook(
  HDC hdcHook,
  HMODULE hModCode,
  LONG lPrivateData,
  UINT hookClass,
  DDIHOOKPROC lpfnDdiHook
);
 

Parameters

hdcHook
Reserved for future use. This parameter must be NULL.
hModCode
Handle to the 16-bit DLL module containing the callback function at the address specified by the lpfnDdiHook parameter.
lPrivateData
A 32-bit value will be passed to the callback function specified by the lpfnDdiHook parameter.
hookClass
DDI hook class value. This value can be one of the following:
DDIHOOK_FONTS Font enhancers.
DDIHOOK_MAGNIFIER Screen magnifiers.
DDIHOOK_RECORDER Screen readers and screen capture utilities.
DDIHOOK_REMOTE Remoting utilities.

lpfnDdiHook
Address of a callback function that matches the return value and argument list of the DDIHookProc function declaration. The winable.h header file defines the DDIHOOKPROC data type for declaring variables that match this declaration. GDI calls this function when specific DDI functions have been called.

Return Values

Returns an HDDI value identifying this DDI hook instance if successful, or zero otherwise. Your application should save the return value to use with the UnhookDDIHook function.

Remarks

The hook class determines the order in which DDI callbacks are called. The actual display device is always the last called. See the winddi.h file in the INC16 directory for more information on what GDI passes to the callback function.

Note The callback procedure specified by the lpfnDdiHook parameter must be written into a 16-bit dynamic-link library (DLL).

See Also

Setting a DDI Hook, Unhooking a DDI Hook