友链
references:
#include <stdio.h>
#include <malloc.h>
#include <windows.h>
#include <iostream>
using namespace std;
int x = 10;
int modifyvalue() {
return (x + 10);
}
int changevalue(int x) {
return (x +=1);
}
int main() {
HMODULE NtdllHandle = GetModuleHandleA("ntdll.dll");
if (NULL == NtdllHandle) return 0;
ULONG_PTR addr_RtlDispatchAPC = (ULONG_PTR)GetProcAddress(NtdllHandle, "RtlDispatchAPC");
printf("%x\n", addr_RtlDispatchAPC);
printf("%p\n", (void*)addr_RtlDispatchAPC);
return 0;
}
// 1 12
// 2 8
// 3 6
直接使用void*
强转即可