]> git.cworth.org Git - apitrace/commitdiff
d3dretrace: Allow multiple dispatches in the same file.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 11 Nov 2012 09:15:09 +0000 (09:15 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 11 Nov 2012 09:15:09 +0000 (09:15 +0000)
retrace/dllretrace.py

index 926bacd250ec7017a97929aa86311e16a4a6d53a..ef1483f0b83f82f46a2c18da58de5a20e5af3767 100644 (file)
@@ -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):