Commit d98cd9e8 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

taskmgr: Use GetGuiResources() directly.

parent d1be006f
......@@ -31,7 +31,6 @@
#include "perfdata.h"
static PROCNTQSI pNtQuerySystemInformation = NULL;
static PROCGGR pGetGuiResources = NULL;
static PROCGPIC pGetProcessIoCounters = NULL;
static PROCISW64 pIsWow64Process = NULL;
static CRITICAL_SECTION PerfDataCriticalSection;
......@@ -60,11 +59,9 @@ BOOL PerfDataInitialize(void)
{
LONG status;
static const WCHAR wszNtdll[] = {'n','t','d','l','l','.','d','l','l',0};
static const WCHAR wszUser32[] = {'u','s','e','r','3','2','.','d','l','l',0};
static const WCHAR wszKernel32[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
pNtQuerySystemInformation = (PROCNTQSI)GetProcAddress(GetModuleHandleW(wszNtdll), "NtQuerySystemInformation");
pGetGuiResources = (PROCGGR)GetProcAddress(GetModuleHandleW(wszUser32), "GetGuiResources");
pGetProcessIoCounters = (PROCGPIC)GetProcAddress(GetModuleHandleW(wszKernel32), "GetProcessIoCounters");
pIsWow64Process = (PROCISW64)GetProcAddress(GetModuleHandleW(wszKernel32), "IsWow64Process");
......@@ -297,10 +294,8 @@ void PerfDataRefresh(void)
RevertToSelf();
CloseHandle(hProcessToken);
}
if (pGetGuiResources) {
pPerfData[Idx].USERObjectCount = pGetGuiResources(hProcess, GR_USEROBJECTS);
pPerfData[Idx].GDIObjectCount = pGetGuiResources(hProcess, GR_GDIOBJECTS);
}
pPerfData[Idx].USERObjectCount = GetGuiResources(hProcess, GR_USEROBJECTS);
pPerfData[Idx].GDIObjectCount = GetGuiResources(hProcess, GR_GDIOBJECTS);
if (pGetProcessIoCounters)
pGetProcessIoCounters(hProcess, &pPerfData[Idx].IOCounters);
if (pIsWow64Process)
......
......@@ -67,7 +67,6 @@ struct _SYSTEM_PAGEFILE_INFORMATION
#define GR_USEROBJECTS 1 /* Count of USER objects */
typedef LONG (WINAPI *PROCNTQSI)(UINT,PVOID,ULONG,PULONG);
typedef DWORD (WINAPI *PROCGGR)(HANDLE,DWORD);
typedef BOOL (WINAPI *PROCGPIC)(HANDLE,PIO_COUNTERS);
typedef BOOL (WINAPI *PROCISW64)(HANDLE,PBOOL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment