[APPHELP] Fix 64 bit issues

This commit is contained in:
Timo Kreuzer 2018-03-04 16:04:17 +01:00
parent 52ea7d39db
commit e59d7a5687
2 changed files with 4 additions and 4 deletions

View file

@ -286,7 +286,7 @@ BOOL WINAPI SdbGetFileAttributes(LPCWSTR path, PATTRINFO *attr_info_ret, LPDWORD
if (headers && module_type == MODTYPE_PE && ((PBYTE)(headers+1) <= mapping_end))
{
DWORD info_size;
SIZE_T export_dir_size;
ULONG export_dir_size;
PIMAGE_EXPORT_DIRECTORY export_dir;
info_size = GetFileVersionInfoSizeW(path, NULL);

View file

@ -597,9 +597,9 @@ FARPROC WINAPI StubGetProcAddress(HINSTANCE hModule, LPCSTR lpProcName)
PHOOKMODULEINFO HookModuleInfo;
FARPROC proc = ((GETPROCADDRESSPROC)g_IntHookEx[0].OriginalFunction)(hModule, lpProcName);
if (!HIWORD(lpProcName))
if ((DWORD_PTR)lpProcName <= MAXUSHORT)
{
sprintf(szOrdProcName, "#%lu", (DWORD)lpProcName);
sprintf(szOrdProcName, "#%Iu", (DWORD_PTR)lpProcName);
lpPrintName = szOrdProcName;
}
@ -676,7 +676,7 @@ VOID SeiPatchNewImport(PIMAGE_THUNK_DATA FirstThunk, PHOOKAPIEX HookApi, PLDR_DA
{
ULONG OldProtection = 0;
PVOID Ptr;
ULONG Size;
SIZE_T Size;
NTSTATUS Status;
SHIMENG_INFO("Hooking API \"%s!%s\" for DLL \"%wZ\"\n", HookApi->LibraryName, HookApi->FunctionName, &LdrEntry->BaseDllName);