【API】获取当前进程的用户对象和GDI对象

GR_GDIOBJECTS
0
 Return the count of GDI objects.   //

GR_USEROBJECTS
1
 Return the count of USER objects.

    HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,FALSE,7604); //传对应的进程ID

    //GetProcessMemoryInfo(hProcess,&ProMem,sizeof(ProMem));

    DWORD dwGdi = GetGuiResources(hProcess, GR_GDIOBJECTS);
    DWORD dwUser = GetGuiResources(hProcess, GR_USEROBJECTS);

    CloseHandle(hProcess);


【API】获取当前进程的用户对象和GDI对象_第1张图片

你可能感兴趣的:(VC++)