From 8512a4b2ec582407bbfe743772af506c4133e34f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 11 Nov 2012 09:15:09 +0000 Subject: [PATCH] d3dretrace: Allow multiple dispatches in the same file. --- retrace/dllretrace.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/retrace/dllretrace.py b/retrace/dllretrace.py index 926bacd..ef1483f 100644 --- a/retrace/dllretrace.py +++ b/retrace/dllretrace.py @@ -37,7 +37,7 @@ class DllDispatcher(Dispatcher): print r'HMODULE g_h%sModule = NULL;' % (tag,) print r'' print r'static PROC' - print r'_getPublicProcAddress(LPCSTR lpProcName) {' + print r'_get%sProcAddress(LPCSTR lpProcName) {' % tag print r' if (!g_h%sModule) {' % tag print r' if (g_sz%sDllName) {' % tag print r' g_h%sModule = LoadLibraryA(g_sz%sDllName);' % (tag, tag) @@ -59,6 +59,10 @@ class DllDispatcher(Dispatcher): Dispatcher.dispatchModule(self, module) + def getProcAddressName(self, module, function): + assert self.isFunctionPublic(module, function) + return '_get%sProcAddress' % (module.name.upper()) + class DllRetracer(Retracer): -- 2.43.0