MCPcopy Create free account
hub / github.com/bwapi/bwapi / _GetImportsList

Function _GetImportsList

bwapi/BWAPI/Source/NewHackUtil.cpp:32–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30 }
31
32 IMAGE_THUNK_DATA32* _GetImportsList(char* sourceModule, char* importModule)
33 {
34 HMODULE tempModule;
35 tempModule = GetModuleHandleA(sourceModule);
36
37 if ( !tempModule )
38 return NULL;
39
40 IMAGE_IMPORT_DESCRIPTOR *imports = _GetImportDescriptor(tempModule);
41 if ( !imports )
42 return NULL;
43
44 for (u32 i = 0; imports[i].Name != 0; i++)
45 {
46 if (lstrcmpiA((char*)(imports[i].Name + (u32)tempModule), importModule) == 0)
47 return (IMAGE_THUNK_DATA32*)(imports[i].OriginalFirstThunk + (u32)tempModule);
48 }
49 return NULL;
50 }
51
52 DWORD* _GetFunctionsList(char* sourceModule, char* importModule)
53 {

Callers 1

PatchImportOldFunction · 0.85

Calls 1

_GetImportDescriptorFunction · 0.85

Tested by

no test coverage detected