MCPcopy Create free account
hub / github.com/InWILL/Locale_Remulator / HookGetModuleFileNameA

Function HookGetModuleFileNameA

LRHook/LRHookFunc.cpp:1163–1174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1161}
1162
1163DWORD WINAPI HookGetModuleFileNameA(
1164 HMODULE hModule,
1165 LPSTR lpFilename,
1166 DWORD nSize
1167)
1168{
1169 LPWSTR lpFilenameW = (LPWSTR)AllocateZeroedMemory(MAX_PATH);
1170 DWORD ret = GetModuleFileNameW(hModule, lpFilenameW, nSize);
1171 OriginalWideCharToMultiByte(settings.CodePage, 0, lpFilenameW, MAX_PATH, lpFilename, MAX_PATH, NULL, NULL);
1172 FreeStringInternal(lpFilenameW);
1173 return ret;
1174}
1175
1176HMODULE WINAPI HookLoadLibraryExA(
1177 _In_ LPCSTR lpLibFileName,

Callers

nothing calls this directly

Calls 2

AllocateZeroedMemoryFunction · 0.85
FreeStringInternalFunction · 0.85

Tested by

no test coverage detected