这是什么意思?我知道NtUnMapViewOfSection是具有2个参数和长返回值的Winapi函数的指针。而且我知道此块正在将“ GetProcAddress”及其参数转换为NtUnmapViewOfSection对象。但是最后一行在做什么?
typedef LONG (WINAPI * NtUnmapViewOfSection)(HANDLE ProcessHandle, PVOID BaseAddress);
NtUnmapViewOfSection xNtUnmapViewOfSection;
xNtUnmapViewOfSection = NtUnmapViewOfSection(GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtUnmapViewOfSection"));
xNtUnmapViewOfSection(Pinfo.hProcess, PVOID(dwImageBase)); // Pinfo is PROCESS_INFORMATION and dwImageBase is a pointer to DWORD
最佳答案
最后一行在做什么?
最后一行调用GetProcAddress()
指向的函数,即调用NtUnmapViewOfSection()
。