Andrew Kolwok
Andrew Kolwok

Reputation:

system wide api hook

What is the best way to do system wide user mode (NOT KERNEL MODE) api hook on Windows NT?

Upvotes: 2

Views: 2242

Answers (3)

Serg Kryvonos
Serg Kryvonos

Reputation: 4667

  1. Use SetWindowsHookEx to inject your dll into all processes.
  2. Use DLL_PROCESS_ATTACH handler to iterate process modules and fill import tables of modules in another process with your handler addresses of your injected dll.
  3. Use shared sections to share your data.

Upvotes: 0

Jim
Jim

Reputation: 11

What kind of hooks? You can intercept event messages via hook apis.

Upvotes: 0

Reed Copsey
Reed Copsey

Reputation: 564323

Normally, you'd do this using SetWindowsHookEx. This allows you to hook into all applications on the current desktop.

There are other options, though. This CodeProject article has a lot of details on hooking mechanisms.

Upvotes: 3

Related Questions