VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/pdh.h@ 33252

Last change on this file since 33252 was 28475, checked in by vboxsync, 15 years ago

crOpenGL: update to wine 1.1.43

  • Property svn:eol-style set to native
File size: 7.9 KB
Line 
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/*
22 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
24 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
25 * a choice of LGPL license versions is made available with the language indicating
26 * that LGPLv2 or any later version may be used, or where a choice of which version
27 * of the LGPL is applied is otherwise unspecified.
28 */
29
30#ifndef _PDH_H_
31#define _PDH_H_
32
33#ifdef __WINESRC__
34# include <windef.h>
35#else
36# include <windows.h>
37#endif
38#include <winperf.h>
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44typedef LONG PDH_STATUS;
45typedef HANDLE PDH_HQUERY;
46typedef HANDLE PDH_HCOUNTER;
47typedef HANDLE PDH_HLOG;
48
49#define PDH_CVERSION_WIN40 0x0400
50#define PDH_CVERSION_WIN50 0x0500
51#define PDH_VERSION 0x0503
52
53#define PDH_MAX_SCALE 7
54#define PDH_MIN_SCALE (-7)
55
56#define PDH_MAX_COUNTER_NAME 1024
57
58#define PDH_FMT_LONG 0x00000100
59#define PDH_FMT_DOUBLE 0x00000200
60#define PDH_FMT_LARGE 0x00000400
61#define PDH_FMT_NOSCALE 0x00001000
62#define PDH_FMT_1000 0x00002000
63#define PDH_FMT_NOCAP100 0x00008000
64
65#define DATA_SOURCE_REGISTRY 0x00000001
66#define DATA_SOURCE_LOGFILE 0x00000002
67#define DATA_SOURCE_WBEM 0x00000004
68
69typedef struct _PDH_FMT_COUNTERVALUE
70{
71 DWORD CStatus;
72 union
73 {
74 LONG longValue;
75 double doubleValue;
76 LONGLONG largeValue;
77 LPCSTR AnsiStringValue;
78 LPCWSTR WideStringValue;
79 } DUMMYUNIONNAME;
80} PDH_FMT_COUNTERVALUE, *PPDH_FMT_COUNTERVALUE;
81
82typedef struct _PDH_RAW_COUNTER
83{
84 DWORD CStatus;
85 FILETIME TimeStamp;
86 LONGLONG FirstValue;
87 LONGLONG SecondValue;
88 DWORD MultiCount;
89} PDH_RAW_COUNTER, *PPDH_RAW_COUNTER;
90
91typedef struct _PDH_COUNTER_PATH_ELEMENTS_A
92{
93 LPSTR szMachineName;
94 LPSTR szObjectName;
95 LPSTR szInstanceName;
96 LPSTR szParentInstance;
97 DWORD dwInstanceIndex;
98 LPSTR szCounterName;
99} PDH_COUNTER_PATH_ELEMENTS_A, *PPDH_COUNTER_PATH_ELEMENTS_A;
100
101typedef struct _PDH_COUNTER_PATH_ELEMENTS_W
102{
103 LPWSTR szMachineName;
104 LPWSTR szObjectName;
105 LPWSTR szInstanceName;
106 LPWSTR szParentInstance;
107 DWORD dwInstanceIndex;
108 LPWSTR szCounterName;
109} PDH_COUNTER_PATH_ELEMENTS_W, *PPDH_COUNTER_PATH_ELEMENTS_W;
110
111typedef struct _PDH_DATA_ITEM_PATH_ELEMENTS_A
112{
113 LPSTR szMachineName;
114 GUID ObjectGUID;
115 DWORD dwItemId;
116 LPSTR szInstanceName;
117} PDH_DATA_ITEM_PATH_ELEMENTS_A, *PPDH_DATA_ITEM_PATH_ELEMENTS_A;
118
119typedef struct _PDH_DATA_ITEM_PATH_ELEMENTS_W
120{
121 LPWSTR szMachineName;
122 GUID ObjectGUID;
123 DWORD dwItemId;
124 LPWSTR szInstanceName;
125} PDH_DATA_ITEM_PATH_ELEMENTS_W, *PPDH_DATA_ITEM_PATH_ELEMENTS_W;
126
127typedef struct _PDH_COUNTER_INFO_A
128{
129 DWORD dwLength;
130 DWORD dwType;
131 DWORD CVersion;
132 DWORD CStatus;
133 LONG lScale;
134 LONG lDefaultScale;
135 DWORD_PTR dwUserData;
136 DWORD_PTR dwQueryUserData;
137 LPSTR szFullPath;
138 union
139 {
140 PDH_DATA_ITEM_PATH_ELEMENTS_A DataItemPath;
141 PDH_COUNTER_PATH_ELEMENTS_A CounterPath;
142 struct
143 {
144 LPSTR szMachineName;
145 LPSTR szObjectName;
146 LPSTR szInstanceName;
147 LPSTR szParentInstance;
148 DWORD dwInstanceIndex;
149 LPSTR szCounterName;
150 } DUMMYSTRUCTNAME;
151 } DUMMYUNIONNAME;
152 LPSTR szExplainText;
153 DWORD DataBuffer[1];
154} PDH_COUNTER_INFO_A, *PPDH_COUNTER_INFO_A;
155
156typedef struct _PDH_COUNTER_INFO_W
157{
158 DWORD dwLength;
159 DWORD dwType;
160 DWORD CVersion;
161 DWORD CStatus;
162 LONG lScale;
163 LONG lDefaultScale;
164 DWORD_PTR dwUserData;
165 DWORD_PTR dwQueryUserData;
166 LPWSTR szFullPath;
167 union
168 {
169 PDH_DATA_ITEM_PATH_ELEMENTS_W DataItemPath;
170 PDH_COUNTER_PATH_ELEMENTS_W CounterPath;
171 struct
172 {
173 LPWSTR szMachineName;
174 LPWSTR szObjectName;
175 LPWSTR szInstanceName;
176 LPWSTR szParentInstance;
177 DWORD dwInstanceIndex;
178 LPWSTR szCounterName;
179 } DUMMYSTRUCTNAME;
180 } DUMMYUNIONNAME;
181 LPWSTR szExplainText;
182 DWORD DataBuffer[1];
183} PDH_COUNTER_INFO_W, *PPDH_COUNTER_INFO_W;
184
185PDH_STATUS WINAPI PdhAddCounterA(PDH_HQUERY, LPCSTR, DWORD_PTR, PDH_HCOUNTER *);
186PDH_STATUS WINAPI PdhAddCounterW(PDH_HQUERY, LPCWSTR, DWORD_PTR, PDH_HCOUNTER *);
187#define PdhAddCounter WINELIB_NAME_AW(PdhAddCounter)
188PDH_STATUS WINAPI PdhAddEnglishCounterA(PDH_HQUERY, LPCSTR, DWORD_PTR, PDH_HCOUNTER *);
189PDH_STATUS WINAPI PdhAddEnglishCounterW(PDH_HQUERY, LPCWSTR, DWORD_PTR, PDH_HCOUNTER *);
190#define PdhAddEnglishCounter WINELIB_NAME_AW(PdhAddEnglishCounter)
191PDH_STATUS WINAPI PdhCloseQuery(PDH_HQUERY);
192PDH_STATUS WINAPI PdhCollectQueryData(PDH_HQUERY);
193PDH_STATUS WINAPI PdhCollectQueryDataEx(PDH_HQUERY, DWORD, HANDLE);
194PDH_STATUS WINAPI PdhCollectQueryDataWithTime(PDH_HQUERY,LONGLONG *);
195PDH_STATUS WINAPI PdhEnumObjectItemsA(LPCSTR, LPCSTR, LPCSTR, LPSTR, LPDWORD, LPSTR, LPDWORD, DWORD, DWORD);
196PDH_STATUS WINAPI PdhEnumObjectItemsW(LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, LPDWORD, LPWSTR, LPDWORD, DWORD, DWORD);
197#define PdhEnumObjectItems WINELIB_NAME_AW(PdhEnumObjectItems)
198PDH_STATUS WINAPI PdhGetCounterInfoA(PDH_HCOUNTER, BOOLEAN, LPDWORD, PPDH_COUNTER_INFO_A);
199PDH_STATUS WINAPI PdhGetCounterInfoW(PDH_HCOUNTER, BOOLEAN, LPDWORD, PPDH_COUNTER_INFO_W);
200#define PdhGetCounterInfo WINELIB_NAME_AW(PdhGetCounterInfo)
201PDH_STATUS WINAPI PdhGetCounterTimeBase(PDH_HCOUNTER, LONGLONG *);
202PDH_STATUS WINAPI PdhGetDllVersion(LPDWORD);
203PDH_STATUS WINAPI PdhGetFormattedCounterValue(PDH_HCOUNTER, DWORD, LPDWORD, PPDH_FMT_COUNTERVALUE);
204PDH_STATUS WINAPI PdhGetRawCounterValue(PDH_HCOUNTER, LPDWORD, PPDH_RAW_COUNTER);
205PDH_STATUS WINAPI PdhLookupPerfIndexByNameA(LPCSTR, LPCSTR, LPDWORD);
206PDH_STATUS WINAPI PdhLookupPerfIndexByNameW(LPCWSTR, LPCWSTR, LPDWORD);
207#define PdhLookupPerfIndexByName WINELIB_NAME_AW(PdhLookupPerfIndexByName)
208PDH_STATUS WINAPI PdhLookupPerfNameByIndexA(LPCSTR, DWORD, LPSTR, LPDWORD);
209PDH_STATUS WINAPI PdhLookupPerfNameByIndexW(LPCWSTR, DWORD, LPWSTR, LPDWORD);
210#define PdhLookupPerfNameByIndex WINELIB_NAME_AW(PdhLookupPerfNameByIndex)
211PDH_STATUS WINAPI PdhMakeCounterPathA(PDH_COUNTER_PATH_ELEMENTS_A *, LPSTR, LPDWORD, DWORD);
212PDH_STATUS WINAPI PdhMakeCounterPathW(PDH_COUNTER_PATH_ELEMENTS_W *, LPWSTR, LPDWORD, DWORD);
213#define PdhMakeCounterPath WINELIB_NAME_AW(PdhMakeCounterPath)
214PDH_STATUS WINAPI PdhOpenQueryA(LPCSTR, DWORD_PTR, PDH_HQUERY *);
215PDH_STATUS WINAPI PdhOpenQueryW(LPCWSTR, DWORD_PTR, PDH_HQUERY *);
216#define PdhOpenQuery WINELIB_NAME_AW(PdhOpenQuery)
217PDH_STATUS WINAPI PdhRemoveCounter(PDH_HCOUNTER);
218PDH_STATUS WINAPI PdhSetCounterScaleFactor(PDH_HCOUNTER, LONG);
219PDH_STATUS WINAPI PdhSetDefaultRealTimeDataSource(DWORD);
220PDH_STATUS WINAPI PdhValidatePathA(LPCSTR);
221PDH_STATUS WINAPI PdhValidatePathW(LPCWSTR);
222#define PdhValidatePath WINELIB_NAME_AW(PdhValidatePath)
223PDH_STATUS WINAPI PdhValidatePathExA(PDH_HLOG, LPCSTR);
224PDH_STATUS WINAPI PdhValidatePathExW(PDH_HLOG, LPCWSTR);
225#define PdhValidatePathEx WINELIB_NAME_AW(PdhValidatePathEx)
226
227#ifdef __cplusplus
228}
229#endif
230
231#endif /* _PDH_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette