2,641
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include <Windows.h>
typedef enum _PROCESSINFOCLASS {
ProcessBasicInformation,
ProcessQuotaLimits,
ProcessIoCounters,
ProcessVmCounters,
ProcessTimes,
ProcessBasePriority,
ProcessRaisePriority,
ProcessDebugPort,
ProcessExceptionPort,
ProcessAccessToken,
ProcessLdtInformation,
ProcessLdtSize,
ProcessDefaultHardErrorMode,
ProcessIoPortHandlers,
ProcessPooledUsageAndLimits,
ProcessWorkingSetWatch,
ProcessUserModeIOPL,
ProcessEnableAlignmentFaultFixup ,
ProcessPriorityClass,
ProcessWx86Information,
ProcessHandleCount,
ProcessAffinityMask,
ProcessPriorityBoost,
ProcessDeviceMap,
ProcessSessionInformation,
ProcessForegroundInformation,
ProcessWow64Information,
ProcessImageFileName,
ProcessLUIDDeviceMapsEnabled,
ProcessBreakOnTermination,
ProcessDebugObjectHandle,
ProcessDebugFlags,
ProcessHandleTracing,
ProcessUnknown33,
ProcessUnknown34,
ProcessUnknown35,
ProcessCookie,
MaxProcessInfoClass
} PROCESSINFOCLASS;
typedef NTSTATUS (WINAPI *PFN_ZwQueryInformationProcess)(HANDLE ProcessHandle, PROCESSINFOCLASS ProcessInformationClass, PVOID ProcessInformation, ULONG ProcessInformationLength, PULONG ReturnLength);
int main()
{
HMODULE hDll = LoadLibrary(_T("Ntdll.dll"));
if(NULL != hDll)
{
PFN_ZwQueryInformationProcess pFn_ZwQueryInformationProcess = (PFN_ZwQueryInformationProcess)GetProcAddress(hDll, "ZwQueryInformationProcess");
if(NULL != pFn_ZwQueryInformationProcess)
{
printf("Found it!!!\n");
}
}
if(NULL != hDll)
{
FreeLibrary(hDll);
hDll = NULL;
}
return 0;
}