NVDA Helper
In-process and lite high-speed utilities for NVDA
|
Go to the source code of this file.
Functions | |
bool | apiHook_beginTransaction () |
Initializes an API hooking transaction. | |
bool | apiHook_hookFunction (void *realFunction, void *fakeFunction, void **targetPointerRef) |
Requests that the given function from the given module should be hooked with the given hook procedure. | |
template<typename funcType > | |
bool | apiHook_hookFunction_safe (funcType realFunction, funcType fakeFunction, funcType *targetPointerRef) |
Safely hooks a given function from a given module with a given fake function. | |
bool | apiHook_commitTransaction () |
Commits an API hooking transaction. | |
bool | apiHook_terminate () |
unhooks all functions previously hooked with apiHook_hookFunction and terminates API hooking subsystem. | |
bool apiHook_beginTransaction | ( | ) |
Initializes an API hooking transaction.
References LOG_DEBUG, and LOG_ERROR.
Referenced by apiHook_terminate(), inprocMgrThreadFunc(), and nvdaHelperLocal_initialize().
Requests that the given function from the given module should be hooked with the given hook procedure.
Warning, this function has no safety checks, you should usually use the apiHook_hookFunction_safe template
realFunction | the function you wish to hook. |
fakeFunction | the function you wish to be called instead of the original one. |
targetPointerRef | Pointer variable that will contain a pointer to the original function after hooking. This is used to unhook. |
References g_hookedFunctions, LOG_DEBUG, and LOG_ERROR.
Referenced by apiHook_hookFunction_safe().
bool apiHook_hookFunction_safe | ( | funcType | realFunction, |
funcType | fakeFunction, | ||
funcType * | targetPointerRef ) |
Safely hooks a given function from a given module with a given fake function.
This is a safer wrapper around apiHook_hookFunction that ensures that the real and fake function have matching signatures.
realFunction | the function you wish to hook. |
fakeFunction | the function you wish to be called instead of the original one. |
targetPointerRef | Pointer variable that will contain a pointer to the original function after hooking. This is used to unhook. |
References apiHook_hookFunction().
Referenced by gdiHooks_inProcess_initialize(), inprocMgrThreadFunc(), and nvdaHelperLocal_initialize().
bool apiHook_commitTransaction | ( | ) |
Commits an API hooking transaction.
References LOG_DEBUG, and LOG_ERROR.
Referenced by apiHook_terminate(), inprocMgrThreadFunc(), and nvdaHelperLocal_initialize().
bool apiHook_terminate | ( | ) |
unhooks all functions previously hooked with apiHook_hookFunction and terminates API hooking subsystem.
References apiHook_beginTransaction(), apiHook_commitTransaction(), g_hookedFunctions, LOG_DEBUG, and LOG_ERROR.
Referenced by DllMain(), inprocMgrThreadFunc(), and nvdaHelperLocal_terminate().