1

I am desperately trying and failing to hook CallWndProc using EasyHook.

Intptr addr = LocalHook.GetProcAddress("user32.dll", "CallWndProc");

This throws with "The given method does not exist.". So I'm guessing either CallWndProc isn't in user32.dll, or it's called something subtly different, or I'm missing some fundamental piece of the puzzle.

Cheers

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
Antony Woods
  • 4,415
  • 3
  • 26
  • 47
  • I'd just like to point out to people who dig this up, I am yet to actually get this working even though GSerg came up with correct name for the function. – Antony Woods Jun 15 '12 at 07:58

1 Answers1

1

The given method does not exists.

The function is exported as CallWindowProcA and CallWindowProcW for ANSI and Unicode calls respectively.

GSerg
  • 76,472
  • 17
  • 159
  • 346
  • Bonus points if you can tell me how to determine, in C#, if a process is compiled using -DUNICODE? – Antony Woods Jun 14 '12 at 14:27
  • @acron "Compiled as unicode" doesn't actually make sense. `CallWindowProc` is designed for working with windows, which a process might not even have. But if there is a window, then [`IsWindowUnicode`](http://msdn.microsoft.com/en-us/library/windows/desktop/ms633529.aspx). – GSerg Jun 14 '12 at 14:36