mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-18 12:36:53 +00:00
Add IAT based hooking to allow hooking 64bit opengl32.dll
* Needs vigorous testing in as many situations as I can think of, not least 32bit, 64bit, D3D11, D3D9, OpenGL, managed apps, different windows SDKs, delay loading dlls (not sure if these will work), statically linked libs, LoadLibrary + GetProcAddress * Credit goes to jslutter for originally bringing it to my attention & suggesting it. * References: http://msdn.microsoft.com/en-us/magazine/bb985992.aspx http://msdn.microsoft.com/en-us/magazine/cc301808.aspx http://www.codeproject.com/Articles/6265/Process-wide-API-spying-an-ultimate-hack
This commit is contained in:
@@ -228,11 +228,13 @@ class OpenGLHook : LibraryHook
|
||||
if(!m_EnabledHooks)
|
||||
return false;
|
||||
|
||||
#if USE_MHOOK
|
||||
if(GetModuleHandleA(DLL_NAME) == NULL)
|
||||
{
|
||||
RDCWARN("Failed to load %s - not inserting OpenGL hooks.", DLL_NAME);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool success = SetupHooks(GL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user