From d849b79975a595b7c59b02b1c81bd477aa9fc3d2 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 2 May 2024 16:05:58 +0800 Subject: [PATCH] Fix data type --- WeChatFerry/com/util.cpp | 6 +++--- WeChatFerry/com/util.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WeChatFerry/com/util.cpp b/WeChatFerry/com/util.cpp index aefcfe4..a03c265 100644 --- a/WeChatFerry/com/util.cpp +++ b/WeChatFerry/com/util.cpp @@ -163,9 +163,9 @@ int GetWeChatVersion(wchar_t *version) return ret; } -UINT64 GetWeChatPid() +DWORD GetWeChatPid() { - UINT64 pid = 0; + DWORD pid = 0; HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); PROCESSENTRY32 pe32 = { sizeof(PROCESSENTRY32) }; while (Process32Next(hSnapshot, &pe32)) { @@ -179,7 +179,7 @@ UINT64 GetWeChatPid() return pid; } -int OpenWeChat(UINT64 *pid) +int OpenWeChat(DWORD *pid) { *pid = GetWeChatPid(); if (*pid) { diff --git a/WeChatFerry/com/util.h b/WeChatFerry/com/util.h index 5d369f8..f870ed6 100644 --- a/WeChatFerry/com/util.h +++ b/WeChatFerry/com/util.h @@ -20,8 +20,8 @@ typedef struct PortPath { char path[MAX_PATH]; } PortPath_t; -UINT64 GetWeChatPid(); -int OpenWeChat(UINT64 *pid); +DWORD GetWeChatPid(); +int OpenWeChat(DWORD *pid); int GetWeChatVersion(wchar_t *version); size_t GetWstringByAddress(UINT64 address, wchar_t *buffer, UINT64 buffer_size); UINT32 GetMemoryIntByAddress(HANDLE hProcess, UINT64 address);