ReactOS 0.4.16-dev-237-gd6eebaa
pdh.h
Go to the documentation of this file.
1/*
2 * Performance Data Helper
3 *
4 * Copyright 2007 Hans Leidekker
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#ifndef _PDH_H_
22#define _PDH_H_
23
24#ifdef __WINESRC__
25# include <windef.h>
26#else
27# include <windows.h>
28#endif
29#include <winperf.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
39
40#define PDH_CVERSION_WIN40 0x0400
41#define PDH_CVERSION_WIN50 0x0500
42#define PDH_VERSION 0x0503
43
44#define PDH_MAX_SCALE 7
45#define PDH_MIN_SCALE (-7)
46
47#define PDH_MAX_COUNTER_NAME 1024
48
49#define PDH_FMT_LONG 0x00000100
50#define PDH_FMT_DOUBLE 0x00000200
51#define PDH_FMT_LARGE 0x00000400
52#define PDH_FMT_NOSCALE 0x00001000
53#define PDH_FMT_1000 0x00002000
54#define PDH_FMT_NOCAP100 0x00008000
55
56#define DATA_SOURCE_REGISTRY 0x00000001
57#define DATA_SOURCE_LOGFILE 0x00000002
58#define DATA_SOURCE_WBEM 0x00000004
59
61{
63 union
64 {
72
73typedef struct _PDH_RAW_COUNTER
74{
81
83{
91
93{
101
103{
109
111{
117
119{
129 union
130 {
133 struct
134 {
146
148{
158 union
159 {
162 struct
163 {
175
178#define PdhAddCounter WINELIB_NAME_AW(PdhAddCounter)
181#define PdhAddEnglishCounter WINELIB_NAME_AW(PdhAddEnglishCounter)
188#define PdhEnumObjectItems WINELIB_NAME_AW(PdhEnumObjectItems)
191#define PdhGetCounterInfo WINELIB_NAME_AW(PdhGetCounterInfo)
198#define PdhLookupPerfIndexByName WINELIB_NAME_AW(PdhLookupPerfIndexByName)
201#define PdhLookupPerfNameByIndex WINELIB_NAME_AW(PdhLookupPerfNameByIndex)
204#define PdhMakeCounterPath WINELIB_NAME_AW(PdhMakeCounterPath)
207#define PdhOpenQuery WINELIB_NAME_AW(PdhOpenQuery)
213#define PdhValidatePath WINELIB_NAME_AW(PdhValidatePath)
216#define PdhValidatePathEx WINELIB_NAME_AW(PdhValidatePathEx)
217
218#ifdef __cplusplus
219}
220#endif
221
222#endif /* _PDH_H_ */
unsigned char BOOLEAN
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _PDH_DATA_ITEM_PATH_ELEMENTS_W PDH_DATA_ITEM_PATH_ELEMENTS_W
PDH_STATUS WINAPI PdhLookupPerfNameByIndexW(LPCWSTR, DWORD, LPWSTR, LPDWORD)
Definition: pdh_main.c:918
PDH_STATUS WINAPI PdhGetCounterTimeBase(PDH_HCOUNTER, LONGLONG *)
Definition: pdh_main.c:735
PDH_STATUS WINAPI PdhOpenQueryA(LPCSTR, DWORD_PTR, PDH_HQUERY *)
Definition: pdh_main.c:957
struct _PDH_COUNTER_PATH_ELEMENTS_A * PPDH_COUNTER_PATH_ELEMENTS_A
PDH_STATUS WINAPI PdhCollectQueryDataWithTime(PDH_HQUERY, LONGLONG *)
Definition: pdh_main.c:579
PDH_STATUS WINAPI PdhCollectQueryDataEx(PDH_HQUERY, DWORD, HANDLE)
Definition: pdh_main.c:520
HANDLE PDH_HCOUNTER
Definition: pdh.h:37
struct _PDH_COUNTER_PATH_ELEMENTS_W * PPDH_COUNTER_PATH_ELEMENTS_W
PDH_STATUS WINAPI PdhGetRawCounterValue(PDH_HCOUNTER, LPDWORD, PPDH_RAW_COUNTER)
Definition: pdh_main.c:806
struct _PDH_RAW_COUNTER PDH_RAW_COUNTER
PDH_STATUS WINAPI PdhValidatePathA(LPCSTR)
Definition: pdh_main.c:1051
struct _PDH_FMT_COUNTERVALUE * PPDH_FMT_COUNTERVALUE
PDH_STATUS WINAPI PdhEnumObjectItemsA(LPCSTR, LPCSTR, LPCSTR, LPSTR, LPDWORD, LPSTR, LPDWORD, DWORD, DWORD)
Definition: pdh_main.c:1243
PDH_STATUS WINAPI PdhMakeCounterPathW(PDH_COUNTER_PATH_ELEMENTS_W *, LPWSTR, LPDWORD, DWORD)
Definition: pdh_main.c:1188
PDH_STATUS WINAPI PdhValidatePathExW(PDH_HLOG, LPCWSTR)
Definition: pdh_main.c:1122
struct _PDH_COUNTER_PATH_ELEMENTS_W PDH_COUNTER_PATH_ELEMENTS_W
struct _PDH_DATA_ITEM_PATH_ELEMENTS_A * PPDH_DATA_ITEM_PATH_ELEMENTS_A
PDH_STATUS WINAPI PdhLookupPerfIndexByNameA(LPCSTR, LPCSTR, LPDWORD)
Definition: pdh_main.c:838
PDH_STATUS WINAPI PdhLookupPerfIndexByNameW(LPCWSTR, LPCWSTR, LPDWORD)
Definition: pdh_main.c:863
PDH_STATUS WINAPI PdhAddEnglishCounterA(PDH_HQUERY, LPCSTR, DWORD_PTR, PDH_HCOUNTER *)
Definition: pdh_main.c:314
PDH_STATUS WINAPI PdhCollectQueryData(PDH_HQUERY)
Definition: pdh_main.c:464
HANDLE PDH_HLOG
Definition: pdh.h:38
PDH_STATUS WINAPI PdhGetFormattedCounterValue(PDH_HCOUNTER, DWORD, LPDWORD, PPDH_FMT_COUNTERVALUE)
Definition: pdh_main.c:772
PDH_STATUS WINAPI PdhRemoveCounter(PDH_HCOUNTER)
Definition: pdh_main.c:1001
PDH_STATUS WINAPI PdhAddEnglishCounterW(PDH_HQUERY, LPCWSTR, DWORD_PTR, PDH_HCOUNTER *)
Definition: pdh_main.c:326
struct _PDH_COUNTER_PATH_ELEMENTS_A PDH_COUNTER_PATH_ELEMENTS_A
PDH_STATUS WINAPI PdhValidatePathExA(PDH_HLOG, LPCSTR)
Definition: pdh_main.c:1107
LONG PDH_STATUS
Definition: pdh.h:35
struct _PDH_FMT_COUNTERVALUE PDH_FMT_COUNTERVALUE
struct _PDH_RAW_COUNTER * PPDH_RAW_COUNTER
struct _PDH_DATA_ITEM_PATH_ELEMENTS_W * PPDH_DATA_ITEM_PATH_ELEMENTS_W
PDH_STATUS WINAPI PdhMakeCounterPathA(PDH_COUNTER_PATH_ELEMENTS_A *, LPSTR, LPDWORD, DWORD)
Definition: pdh_main.c:1137
PDH_STATUS WINAPI PdhAddCounterW(PDH_HQUERY, LPCWSTR, DWORD_PTR, PDH_HCOUNTER *)
Definition: pdh_main.c:264
PDH_STATUS WINAPI PdhCloseQuery(PDH_HQUERY)
Definition: pdh_main.c:397
struct _PDH_COUNTER_INFO_A * PPDH_COUNTER_INFO_A
PDH_STATUS WINAPI PdhSetDefaultRealTimeDataSource(DWORD)
Definition: pdh_main.c:1271
HANDLE PDH_HQUERY
Definition: pdh.h:36
struct _PDH_COUNTER_INFO_W * PPDH_COUNTER_INFO_W
PDH_STATUS WINAPI PdhSetCounterScaleFactor(PDH_HCOUNTER, LONG)
Definition: pdh_main.c:1024
struct _PDH_COUNTER_INFO_W PDH_COUNTER_INFO_W
PDH_STATUS WINAPI PdhGetDllVersion(LPDWORD)
Definition: pdh_main.c:759
PDH_STATUS WINAPI PdhOpenQueryW(LPCWSTR, DWORD_PTR, PDH_HQUERY *)
Definition: pdh_main.c:975
PDH_STATUS WINAPI PdhEnumObjectItemsW(LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, LPDWORD, LPWSTR, LPDWORD, DWORD, DWORD)
Definition: pdh_main.c:1257
struct _PDH_DATA_ITEM_PATH_ELEMENTS_A PDH_DATA_ITEM_PATH_ELEMENTS_A
PDH_STATUS WINAPI PdhGetCounterInfoW(PDH_HCOUNTER, BOOLEAN, LPDWORD, PPDH_COUNTER_INFO_W)
Definition: pdh_main.c:693
struct _PDH_COUNTER_INFO_A PDH_COUNTER_INFO_A
PDH_STATUS WINAPI PdhLookupPerfNameByIndexA(LPCSTR, DWORD, LPSTR, LPDWORD)
Definition: pdh_main.c:890
PDH_STATUS WINAPI PdhGetCounterInfoA(PDH_HCOUNTER, BOOLEAN, LPDWORD, PPDH_COUNTER_INFO_A)
Definition: pdh_main.c:651
PDH_STATUS WINAPI PdhValidatePathW(LPCWSTR)
Definition: pdh_main.c:1077
PDH_STATUS WINAPI PdhAddCounterA(PDH_HQUERY, LPCSTR, DWORD_PTR, PDH_HCOUNTER *)
Definition: pdh_main.c:242
long LONG
Definition: pedump.c:60
union _PDH_COUNTER_INFO_A::@3192 DUMMYUNIONNAME
LPSTR szMachineName
Definition: pdh.h:135
DWORD CStatus
Definition: pdh.h:123
DWORD_PTR dwQueryUserData
Definition: pdh.h:127
DWORD dwLength
Definition: pdh.h:120
DWORD dwInstanceIndex
Definition: pdh.h:139
LPSTR szFullPath
Definition: pdh.h:128
PDH_COUNTER_PATH_ELEMENTS_A CounterPath
Definition: pdh.h:132
DWORD_PTR dwUserData
Definition: pdh.h:126
LONG lDefaultScale
Definition: pdh.h:125
PDH_DATA_ITEM_PATH_ELEMENTS_A DataItemPath
Definition: pdh.h:131
DWORD CVersion
Definition: pdh.h:122
LPSTR szCounterName
Definition: pdh.h:140
DWORD dwType
Definition: pdh.h:121
LPSTR szObjectName
Definition: pdh.h:136
LPSTR szInstanceName
Definition: pdh.h:137
DWORD DataBuffer[1]
Definition: pdh.h:144
LPSTR szExplainText
Definition: pdh.h:143
LPSTR szParentInstance
Definition: pdh.h:138
struct _PDH_COUNTER_INFO_A::@3192::@3193 DUMMYSTRUCTNAME
LPWSTR szInstanceName
Definition: pdh.h:166
DWORD CStatus
Definition: pdh.h:152
LPWSTR szExplainText
Definition: pdh.h:172
LPWSTR szCounterName
Definition: pdh.h:169
DWORD dwLength
Definition: pdh.h:149
DWORD dwType
Definition: pdh.h:150
union _PDH_COUNTER_INFO_W::@3194 DUMMYUNIONNAME
struct _PDH_COUNTER_INFO_W::@3194::@3195 DUMMYSTRUCTNAME
LONG lDefaultScale
Definition: pdh.h:154
DWORD_PTR dwQueryUserData
Definition: pdh.h:156
DWORD DataBuffer[1]
Definition: pdh.h:173
PDH_COUNTER_PATH_ELEMENTS_W CounterPath
Definition: pdh.h:161
DWORD dwInstanceIndex
Definition: pdh.h:168
LPWSTR szMachineName
Definition: pdh.h:164
LPWSTR szFullPath
Definition: pdh.h:157
PDH_DATA_ITEM_PATH_ELEMENTS_W DataItemPath
Definition: pdh.h:160
LPWSTR szObjectName
Definition: pdh.h:165
LPWSTR szParentInstance
Definition: pdh.h:167
DWORD CVersion
Definition: pdh.h:151
DWORD_PTR dwUserData
Definition: pdh.h:155
union _PDH_FMT_COUNTERVALUE::@3191 DUMMYUNIONNAME
double doubleValue
Definition: pdh.h:66
LPCSTR AnsiStringValue
Definition: pdh.h:68
LPCWSTR WideStringValue
Definition: pdh.h:69
LONGLONG largeValue
Definition: pdh.h:67
DWORD CStatus
Definition: pdh.h:75
LONGLONG SecondValue
Definition: pdh.h:78
DWORD MultiCount
Definition: pdh.h:79
LONGLONG FirstValue
Definition: pdh.h:77
FILETIME TimeStamp
Definition: pdh.h:76
uint32_t DWORD_PTR
Definition: typedefs.h:65
int64_t LONGLONG
Definition: typedefs.h:68
uint32_t * LPDWORD
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185