C++ hooking a dll?

前端 未结 5 1608
我寻月下人不归
我寻月下人不归 2021-02-03 11:26

Is there a quick way to hook a dll in c++? I know there is Microsoft\'s Detours thing, but isn\'t there a quick a simple way just to hook a few dll functions?

For examp

5条回答
  •  梦毁少年i
    2021-02-03 12:17

    Just call GetProcAddress(hDll, "mytestfunction"), and write jmp hook_mytestfunction there, then place instructions at start of mytestfunction in hook_mytestfunction.

    It's really quick and easy, of course if you understand it. If you don't - use MS Detours or another library. Usually you can do it without understanding of how it works.

提交回复
热议问题