The yougest one, IsWow64Proces, is available since WinXP SP2 / Vista.
Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- programs/taskmgr/perfdata.c | 12 ++---------- programs/taskmgr/perfdata.h | 3 --- 2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/programs/taskmgr/perfdata.c b/programs/taskmgr/perfdata.c index a152415357e..bbd3327ab58 100644 --- a/programs/taskmgr/perfdata.c +++ b/programs/taskmgr/perfdata.c @@ -30,8 +30,6 @@ #include "taskmgr.h" #include "perfdata.h"
-static PROCGPIC pGetProcessIoCounters = NULL; -static PROCISW64 pIsWow64Process = NULL; static CRITICAL_SECTION PerfDataCriticalSection; static PPERFDATA pPerfDataOld = NULL; /* Older perf data (saved to establish delta values) */ static PPERFDATA pPerfData = NULL; /* Most recent copy of perf data */ @@ -57,11 +55,7 @@ static size_t size_diff(size_t x, size_t y) BOOL PerfDataInitialize(void) { LONG status; - static const WCHAR wszKernel32[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
- pGetProcessIoCounters = (PROCGPIC)GetProcAddress(GetModuleHandleW(wszKernel32), "GetProcessIoCounters"); - pIsWow64Process = (PROCISW64)GetProcAddress(GetModuleHandleW(wszKernel32), "IsWow64Process"); - InitializeCriticalSection(&PerfDataCriticalSection);
/* @@ -291,10 +285,8 @@ void PerfDataRefresh(void) } pPerfData[Idx].USERObjectCount = GetGuiResources(hProcess, GR_USEROBJECTS); pPerfData[Idx].GDIObjectCount = GetGuiResources(hProcess, GR_GDIOBJECTS); - if (pGetProcessIoCounters) - pGetProcessIoCounters(hProcess, &pPerfData[Idx].IOCounters); - if (pIsWow64Process) - pIsWow64Process(hProcess, &pPerfData[Idx].Wow64Process); + GetProcessIoCounters(hProcess, &pPerfData[Idx].IOCounters); + IsWow64Process(hProcess, &pPerfData[Idx].Wow64Process); CloseHandle(hProcess); } pPerfData[Idx].UserTime.QuadPart = pSPI->UserTime.QuadPart; diff --git a/programs/taskmgr/perfdata.h b/programs/taskmgr/perfdata.h index 0b06965d52e..615e7db2a64 100644 --- a/programs/taskmgr/perfdata.h +++ b/programs/taskmgr/perfdata.h @@ -66,9 +66,6 @@ struct _SYSTEM_PAGEFILE_INFORMATION #define GR_GDIOBJECTS 0 /* Count of GDI objects */ #define GR_USEROBJECTS 1 /* Count of USER objects */
-typedef BOOL (WINAPI *PROCGPIC)(HANDLE,PIO_COUNTERS); -typedef BOOL (WINAPI *PROCISW64)(HANDLE,PBOOL); - BOOL PerfDataInitialize(void); void PerfDataRefresh(void);