interposers on Windows

前端 未结 2 1422
盖世英雄少女心
盖世英雄少女心 2021-01-23 07:09

Is it possible to substitute system functions, as is possible on Linux and Solaris using the LD_PRELOAD

For example by setting the environment variable: LD_PRELOAD=/path

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-23 07:28

    Microsoft Research has a library called Detours which allows you to intercept Win32 API calls.

    Detours is a library for instrumenting arbitrary Win32 functions on x86, x64, and IA64 machines. Detours intercepts Win32 functions by re-writing the in-memory code for target functions. The Detours package also contains utilities to attach arbitrary DLLs and data segments (called payloads) to any Win32 binary.

提交回复
热议问题