from trace import Tracer
from dispatch import Dispatcher
+from specs.stdapi import API
class DllTracer(Tracer):
def header(self, api):
print '''
-static HINSTANCE g_hDll = NULL;
+static HMODULE g_hDll = NULL;
static PROC
-__getPublicProcAddress(LPCSTR lpProcName)
+_getPublicProcAddress(LPCSTR lpProcName)
{
if (!g_hDll) {
char szDll[MAX_PATH] = {0};
''' % self.dllname
- dispatcher = Dispatcher()
- dispatcher.dispatch_api(api)
+ for module in api.modules:
+ dispatcher = Dispatcher()
+ dispatcher.dispatchModule(module)
Tracer.header(self, api)
+ def traceModule(self, module):
+ api = API()
+ api.addModule(module)
+ self.traceApi(api)