Reddy
Reddy

Reputation: 1003

SetWindowsHookEx for DeviceIOControl, what hookid to be used?

HHOOK WINAPI SetWindowsHookEx(
  _In_  int idHook,
  _In_  HOOKPROC lpfn,
  _In_  HINSTANCE hMod,
  _In_  DWORD dwThreadId
);

On MSDN listed available idHook values, there are:

So, what idHook should be used for hook DeviceIOControl function (for console application)? Or may i'd use some other hook method?

Upvotes: 0

Views: 1046

Answers (1)

Necrolis
Necrolis

Reputation: 26181

DeviceIOControl is for interacting with drivers, and non of the hooks windows provides in user mode allow hooking driver interaction, instead you best best would be to write a filter using the windows DDK/WDK/Windows SDK (depending what windows version you are targeting).

Upvotes: 2

Related Questions