From f98dad4db290d54f28f5184cc575ff6e0a0a9aef Mon Sep 17 00:00:00 2001 From: silverf0x Date: Sun, 20 Jan 2019 18:04:09 +0100 Subject: [PATCH] Fix call convension for the ProcexpOpenProcess function and support for the 32-bit version. --- RpcCommon/Misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RpcCommon/Misc.c b/RpcCommon/Misc.c index a7f766e..25861ed 100644 --- a/RpcCommon/Misc.c +++ b/RpcCommon/Misc.c @@ -22,10 +22,10 @@ typedef struct _LanguageCodePage_T { HANDLE hProcexp = NULL; -HANDLE ProcexpOpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId) +HANDLE WINAPI ProcexpOpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId) { HANDLE hProcess = NULL; - UINT64 Pid = dwProcessId; + HANDLE Pid = (HANDLE)(uintptr_t)dwProcessId; DWORD Bytes; hProcess = OpenProcess(dwDesiredAccess, bInheritHandle, dwProcessId);