From: José Fonseca Date: Sun, 11 Nov 2012 09:15:09 +0000 (+0000) Subject: d3dretrace: Allow multiple dispatches in the same file. X-Git-Url: https://git.cworth.org/git?p=apitrace;a=commitdiff_plain;h=8512a4b2ec582407bbfe743772af506c4133e34f d3dretrace: Allow multiple dispatches in the same file. --- 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):