modified dll/win32/kernel32/kernel32.rbuild
[reactos.git] / base / applications / taskmgr / perfdata.h
1 /*
2 * ReactOS Task Manager
3 *
4 * perfdata.h
5 *
6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
7 *
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.
12 *
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.
17 *
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23 #ifndef __PERFDATA_H
24 #define __PERFDATA_H
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 #define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + (double)((x).LowPart))
31
32 typedef struct _PERFDATA
33 {
34 WCHAR ImageName[MAX_PATH];
35 HANDLE ProcessId;
36 WCHAR UserName[MAX_PATH];
37 ULONG SessionId;
38 ULONG CPUUsage;
39 LARGE_INTEGER CPUTime;
40 ULONG WorkingSetSizeBytes;
41 ULONG PeakWorkingSetSizeBytes;
42 ULONG WorkingSetSizeDelta;
43 ULONG PageFaultCount;
44 ULONG PageFaultCountDelta;
45 ULONG VirtualMemorySizeBytes;
46 ULONG PagedPoolUsagePages;
47 ULONG NonPagedPoolUsagePages;
48 ULONG BasePriority;
49 ULONG HandleCount;
50 ULONG ThreadCount;
51 ULONG USERObjectCount;
52 ULONG GDIObjectCount;
53 IO_COUNTERS IOCounters;
54
55 LARGE_INTEGER UserTime;
56 LARGE_INTEGER KernelTime;
57 } PERFDATA, *PPERFDATA;
58
59 BOOL PerfDataInitialize(void);
60 void PerfDataUninitialize(void);
61 void PerfDataRefresh(void);
62
63 ULONG PerfDataGetProcessCount(void);
64 ULONG PerfDataGetProcessorUsage(void);
65 ULONG PerfDataGetProcessorSystemUsage(void);
66
67 BOOL PerfDataGetImageName(ULONG Index, LPTSTR lpImageName, int nMaxCount);
68 ULONG PerfDataGetProcessId(ULONG Index);
69 BOOL PerfDataGetUserName(ULONG Index, LPTSTR lpUserName, int nMaxCount);
70 ULONG PerfDataGetSessionId(ULONG Index);
71 ULONG PerfDataGetCPUUsage(ULONG Index);
72 LARGE_INTEGER PerfDataGetCPUTime(ULONG Index);
73 ULONG PerfDataGetWorkingSetSizeBytes(ULONG Index);
74 ULONG PerfDataGetPeakWorkingSetSizeBytes(ULONG Index);
75 ULONG PerfDataGetWorkingSetSizeDelta(ULONG Index);
76 ULONG PerfDataGetPageFaultCount(ULONG Index);
77 ULONG PerfDataGetPageFaultCountDelta(ULONG Index);
78 ULONG PerfDataGetVirtualMemorySizeBytes(ULONG Index);
79 ULONG PerfDataGetPagedPoolUsagePages(ULONG Index);
80 ULONG PerfDataGetNonPagedPoolUsagePages(ULONG Index);
81 ULONG PerfDataGetBasePriority(ULONG Index);
82 ULONG PerfDataGetHandleCount(ULONG Index);
83 ULONG PerfDataGetThreadCount(ULONG Index);
84 ULONG PerfDataGetUSERObjectCount(ULONG Index);
85 ULONG PerfDataGetGDIObjectCount(ULONG Index);
86 BOOL PerfDataGetIOCounters(ULONG Index, PIO_COUNTERS pIoCounters);
87
88 ULONG PerfDataGetCommitChargeTotalK(void);
89 ULONG PerfDataGetCommitChargeLimitK(void);
90 ULONG PerfDataGetCommitChargePeakK(void);
91
92 ULONG PerfDataGetKernelMemoryTotalK(void);
93 ULONG PerfDataGetKernelMemoryPagedK(void);
94 ULONG PerfDataGetKernelMemoryNonPagedK(void);
95
96 ULONG PerfDataGetPhysicalMemoryTotalK(void);
97 ULONG PerfDataGetPhysicalMemoryAvailableK(void);
98 ULONG PerfDataGetPhysicalMemorySystemCacheK(void);
99
100 ULONG PerfDataGetSystemHandleCount(void);
101
102 ULONG PerfDataGetTotalThreadCount(void);
103
104
105 #ifdef __cplusplus
106 };
107 #endif
108
109 #endif /* __PERFDATA_H */