advapi32/tests: Fix the backup tests when run in a non-administrator pre-Vista account.
[wine/multimedia.git] / programs / taskmgr / perfdata.h
blobbe6b819457a642f7be7d8d6c647bf3f16e2630a7
1 /*
2 * ReactOS Task Manager
4 * perfdata.h
6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #ifndef __PERFDATA_H
24 #define __PERFDATA_H
26 #include "winternl.h"
28 typedef ULARGE_INTEGER TIME;
30 typedef struct _PERFDATA
32 WCHAR ImageName[MAX_PATH];
33 ULONG ProcessId;
34 WCHAR UserName[MAX_PATH];
35 ULONG SessionId;
36 ULONG CPUUsage;
37 TIME CPUTime;
38 ULONG BasePriority;
39 ULONG HandleCount;
40 ULONG ThreadCount;
41 ULONG USERObjectCount;
42 ULONG GDIObjectCount;
43 SIZE_T WorkingSetSizeDelta;
44 ULONG PageFaultCountDelta;
45 VM_COUNTERS vmCounters;
46 IO_COUNTERS IOCounters;
48 TIME UserTime;
49 TIME KernelTime;
50 } PERFDATA, *PPERFDATA;
52 /* SystemPageFileInformation (18) */
53 typedef
54 struct _SYSTEM_PAGEFILE_INFORMATION
56 ULONG RelativeOffset;
57 ULONG CurrentSizePages;
58 ULONG TotalUsedPages;
59 ULONG PeakUsedPages;
60 UNICODE_STRING PagefileFileName;
61 } SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
63 #define Li2Double(x) ((double)((x).QuadPart))
65 #define GR_GDIOBJECTS 0 /* Count of GDI objects */
66 #define GR_USEROBJECTS 1 /* Count of USER objects */
68 typedef LONG (WINAPI *PROCNTQSI)(UINT,PVOID,ULONG,PULONG);
69 typedef DWORD (WINAPI *PROCGGR)(HANDLE,DWORD);
70 typedef BOOL (WINAPI *PROCGPIC)(HANDLE,PIO_COUNTERS);
72 BOOL PerfDataInitialize(void);
73 void PerfDataRefresh(void);
75 ULONG PerfDataGetProcessCount(void);
76 ULONG PerfDataGetProcessorUsage(void);
77 ULONG PerfDataGetProcessorSystemUsage(void);
79 BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, int nMaxCount);
80 ULONG PerfDataGetProcessId(ULONG Index);
81 BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, int nMaxCount);
82 ULONG PerfDataGetSessionId(ULONG Index);
83 ULONG PerfDataGetCPUUsage(ULONG Index);
84 TIME PerfDataGetCPUTime(ULONG Index);
85 ULONG PerfDataGetWorkingSetSizeBytes(ULONG Index);
86 ULONG PerfDataGetPeakWorkingSetSizeBytes(ULONG Index);
87 ULONG PerfDataGetWorkingSetSizeDelta(ULONG Index);
88 ULONG PerfDataGetPageFaultCount(ULONG Index);
89 ULONG PerfDataGetPageFaultCountDelta(ULONG Index);
90 ULONG PerfDataGetVirtualMemorySizeBytes(ULONG Index);
91 ULONG PerfDataGetPagedPoolUsagePages(ULONG Index);
92 ULONG PerfDataGetNonPagedPoolUsagePages(ULONG Index);
93 ULONG PerfDataGetBasePriority(ULONG Index);
94 ULONG PerfDataGetHandleCount(ULONG Index);
95 ULONG PerfDataGetThreadCount(ULONG Index);
96 ULONG PerfDataGetUSERObjectCount(ULONG Index);
97 ULONG PerfDataGetGDIObjectCount(ULONG Index);
98 BOOL PerfDataGetIOCounters(ULONG Index, PIO_COUNTERS pIoCounters);
100 ULONG PerfDataGetCommitChargeTotalK(void);
101 ULONG PerfDataGetCommitChargeLimitK(void);
102 ULONG PerfDataGetCommitChargePeakK(void);
104 ULONG PerfDataGetKernelMemoryTotalK(void);
105 ULONG PerfDataGetKernelMemoryPagedK(void);
106 ULONG PerfDataGetKernelMemoryNonPagedK(void);
108 ULONG PerfDataGetPhysicalMemoryTotalK(void);
109 ULONG PerfDataGetPhysicalMemoryAvailableK(void);
110 ULONG PerfDataGetPhysicalMemorySystemCacheK(void);
112 ULONG PerfDataGetSystemHandleCount(void);
114 ULONG PerfDataGetTotalThreadCount(void);
116 #endif /* __PERFDATA_H */