From 63c905a559aedd4c16692fc3a5ec0e808695c5d7 Mon Sep 17 00:00:00 2001 From: maowenrui <3505719167@qq.com> Date: Tue, 30 Jun 2026 16:59:11 +0800 Subject: [PATCH] fix kernel_get_expotr_func ret par unsigned char --- Anti-Cheat_Driver/utils.cpp | 5 +++-- Anti-Cheat_Driver/utils.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Anti-Cheat_Driver/utils.cpp b/Anti-Cheat_Driver/utils.cpp index 49f975e..d1f96c5 100644 --- a/Anti-Cheat_Driver/utils.cpp +++ b/Anti-Cheat_Driver/utils.cpp @@ -57,11 +57,12 @@ namespace utils return 0; } - auto kernel_get_expotr_func(wchar_t* func_name)-> uintptr_t + auto kernel_get_expotr_func(wchar_t* func_name)-> unsigned char* { + UNICODE_STRING unicode_func_name{ 0 }; RtlInitUnicodeString(&unicode_func_name, func_name); - return (uintptr_t)MmGetSystemRoutineAddress(&unicode_func_name); + return (unsigned char*)MmGetSystemRoutineAddress(&unicode_func_name); } diff --git a/Anti-Cheat_Driver/utils.h b/Anti-Cheat_Driver/utils.h index f6cc8f3..334509e 100644 --- a/Anti-Cheat_Driver/utils.h +++ b/Anti-Cheat_Driver/utils.h @@ -10,7 +10,7 @@ namespace utils auto FindSectionsCode(unsigned long long Base, const char* pattern, const char* mask, const char* name) -> ULONG64; - auto kernel_get_expotr_func(wchar_t* func_name) -> uintptr_t; + auto kernel_get_expotr_func(wchar_t* func_name) -> unsigned char*; auto get_beep_trampoline_ptr()->uintptr_t;