VirtualBox

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

Last change on this file since 27512 was 19678, checked in by vboxsync, 16 years ago

opengl: update wine to 1.1.21, add d3d9.dll to build list

  • Property svn:eol-style set to native
File size: 7.6 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_MAX_SCALE 7
50#define PDH_MIN_SCALE (-7)
51
52#define PDH_MAX_COUNTER_NAME 1024
53
54#define PDH_FMT_LONG 0x00000100
55#define PDH_FMT_DOUBLE 0x00000200
56#define PDH_FMT_LARGE 0x00000400
57#define PDH_FMT_NOSCALE 0x00001000
58#define PDH_FMT_1000 0x00002000
59#define PDH_FMT_NOCAP100 0x00008000
60
61typedef struct _PDH_FMT_COUNTERVALUE
62{
63 DWORD CStatus;
64 union
65 {
66 LONG longValue;
67 double doubleValue;
68 LONGLONG largeValue;
69 LPCSTR AnsiStringValue;
70 LPCWSTR WideStringValue;
71 } DUMMYUNIONNAME;
72} PDH_FMT_COUNTERVALUE, *PPDH_FMT_COUNTERVALUE;
73
74typedef struct _PDH_RAW_COUNTER
75{
76 DWORD CStatus;
77 FILETIME TimeStamp;
78 LONGLONG FirstValue;
79 LONGLONG SecondValue;
80 DWORD MultiCount;
81} PDH_RAW_COUNTER, *PPDH_RAW_COUNTER;
82
83typedef struct _PDH_COUNTER_PATH_ELEMENTS_A
84{
85 LPSTR szMachineName;
86 LPSTR szObjectName;
87 LPSTR szInstanceName;
88 LPSTR szParentInstance;
89 DWORD dwInstanceIndex;
90 LPSTR szCounterName;
91} PDH_COUNTER_PATH_ELEMENTS_A, *PPDH_COUNTER_PATH_ELEMENTS_A;
92
93typedef struct _PDH_COUNTER_PATH_ELEMENTS_W
94{
95 LPWSTR szMachineName;
96 LPWSTR szObjectName;
97 LPWSTR szInstanceName;
98 LPWSTR szParentInstance;
99 DWORD dwInstanceIndex;
100 LPWSTR szCounterName;
101} PDH_COUNTER_PATH_ELEMENTS_W, *PPDH_COUNTER_PATH_ELEMENTS_W;
102
103typedef struct _PDH_DATA_ITEM_PATH_ELEMENTS_A
104{
105 LPSTR szMachineName;
106 GUID ObjectGUID;
107 DWORD dwItemId;
108 LPSTR szInstanceName;
109} PDH_DATA_ITEM_PATH_ELEMENTS_A, *PPDH_DATA_ITEM_PATH_ELEMENTS_A;
110
111typedef struct _PDH_DATA_ITEM_PATH_ELEMENTS_W
112{
113 LPWSTR szMachineName;
114 GUID ObjectGUID;
115 DWORD dwItemId;
116 LPWSTR szInstanceName;
117} PDH_DATA_ITEM_PATH_ELEMENTS_W, *PPDH_DATA_ITEM_PATH_ELEMENTS_W;
118
119typedef struct _PDH_COUNTER_INFO_A
120{
121 DWORD dwLength;
122 DWORD dwType;
123 DWORD CVersion;
124 DWORD CStatus;
125 LONG lScale;
126 LONG lDefaultScale;
127 DWORD_PTR dwUserData;
128 DWORD_PTR dwQueryUserData;
129 LPSTR szFullPath;
130 union
131 {
132 PDH_DATA_ITEM_PATH_ELEMENTS_A DataItemPath;
133 PDH_COUNTER_PATH_ELEMENTS_A CounterPath;
134 struct
135 {
136 LPSTR szMachineName;
137 LPSTR szObjectName;
138 LPSTR szInstanceName;
139 LPSTR szParentInstance;
140 DWORD dwInstanceIndex;
141 LPSTR szCounterName;
142 } DUMMYSTRUCTNAME;
143 } DUMMYUNIONNAME;
144 LPSTR szExplainText;
145 DWORD DataBuffer[1];
146} PDH_COUNTER_INFO_A, *PPDH_COUNTER_INFO_A;
147
148typedef struct _PDH_COUNTER_INFO_W
149{
150 DWORD dwLength;
151 DWORD dwType;
152 DWORD CVersion;
153 DWORD CStatus;
154 LONG lScale;
155 LONG lDefaultScale;
156 DWORD_PTR dwUserData;
157 DWORD_PTR dwQueryUserData;
158 LPWSTR szFullPath;
159 union
160 {
161 PDH_DATA_ITEM_PATH_ELEMENTS_W DataItemPath;
162 PDH_COUNTER_PATH_ELEMENTS_W CounterPath;
163 struct
164 {
165 LPWSTR szMachineName;
166 LPWSTR szObjectName;
167 LPWSTR szInstanceName;
168 LPWSTR szParentInstance;
169 DWORD dwInstanceIndex;
170 LPWSTR szCounterName;
171 } DUMMYSTRUCTNAME;
172 } DUMMYUNIONNAME;
173 LPWSTR szExplainText;
174 DWORD DataBuffer[1];
175} PDH_COUNTER_INFO_W, *PPDH_COUNTER_INFO_W;
176
177PDH_STATUS WINAPI PdhAddCounterA(PDH_HQUERY, LPCSTR, DWORD_PTR, PDH_HCOUNTER *);
178PDH_STATUS WINAPI PdhAddCounterW(PDH_HQUERY, LPCWSTR, DWORD_PTR, PDH_HCOUNTER *);
179#define PdhAddCounter WINELIB_NAME_AW(PdhAddCounter)
180PDH_STATUS WINAPI PdhAddEnglishCounterA(PDH_HQUERY, LPCSTR, DWORD_PTR, PDH_HCOUNTER *);
181PDH_STATUS WINAPI PdhAddEnglishCounterW(PDH_HQUERY, LPCWSTR, DWORD_PTR, PDH_HCOUNTER *);
182#define PdhAddEnglishCounter WINELIB_NAME_AW(PdhAddEnglishCounter)
183PDH_STATUS WINAPI PdhCloseQuery(PDH_HQUERY);
184PDH_STATUS WINAPI PdhCollectQueryData(PDH_HQUERY);
185PDH_STATUS WINAPI PdhCollectQueryDataEx(PDH_HQUERY, DWORD, HANDLE);
186PDH_STATUS WINAPI PdhCollectQueryDataWithTime(PDH_HQUERY,LONGLONG *);
187PDH_STATUS WINAPI PdhEnumObjectItemsA(LPCSTR, LPCSTR, LPCSTR, LPSTR, LPDWORD, LPSTR, LPDWORD, DWORD, DWORD);
188PDH_STATUS WINAPI PdhEnumObjectItemsW(LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, LPDWORD, LPWSTR, LPDWORD, DWORD, DWORD);
189#define PdhEnumObjectItems WINELIB_NAME_AW(PdhEnumObjectItems)
190PDH_STATUS WINAPI PdhGetCounterInfoA(PDH_HCOUNTER, BOOLEAN, LPDWORD, PPDH_COUNTER_INFO_A);
191PDH_STATUS WINAPI PdhGetCounterInfoW(PDH_HCOUNTER, BOOLEAN, LPDWORD, PPDH_COUNTER_INFO_W);
192#define PdhGetCounterInfo WINELIB_NAME_AW(PdhGetCounterInfo)
193PDH_STATUS WINAPI PdhGetCounterTimeBase(PDH_HCOUNTER, LONGLONG *);
194PDH_STATUS WINAPI PdhGetFormattedCounterValue(PDH_HCOUNTER, DWORD, LPDWORD, PPDH_FMT_COUNTERVALUE);
195PDH_STATUS WINAPI PdhGetRawCounterValue(PDH_HCOUNTER, LPDWORD, PPDH_RAW_COUNTER);
196PDH_STATUS WINAPI PdhLookupPerfIndexByNameA(LPCSTR, LPCSTR, LPDWORD);
197PDH_STATUS WINAPI PdhLookupPerfIndexByNameW(LPCWSTR, LPCWSTR, LPDWORD);
198#define PdhLookupPerfIndexByName WINELIB_NAME_AW(PdhLookupPerfIndexByName)
199PDH_STATUS WINAPI PdhLookupPerfNameByIndexA(LPCSTR, DWORD, LPSTR, LPDWORD);
200PDH_STATUS WINAPI PdhLookupPerfNameByIndexW(LPCWSTR, DWORD, LPWSTR, LPDWORD);
201#define PdhLookupPerfNameByIndex WINELIB_NAME_AW(PdhLookupPerfNameByIndex)
202PDH_STATUS WINAPI PdhMakeCounterPathA(PDH_COUNTER_PATH_ELEMENTS_A *, LPSTR, LPDWORD, DWORD);
203PDH_STATUS WINAPI PdhMakeCounterPathW(PDH_COUNTER_PATH_ELEMENTS_W *, LPWSTR, LPDWORD, DWORD);
204#define PdhMakeCounterPath WINELIB_NAME_AW(PdhMakeCounterPath)
205PDH_STATUS WINAPI PdhOpenQueryA(LPCSTR, DWORD_PTR, PDH_HQUERY *);
206PDH_STATUS WINAPI PdhOpenQueryW(LPCWSTR, DWORD_PTR, PDH_HQUERY *);
207#define PdhOpenQuery WINELIB_NAME_AW(PdhOpenQuery)
208PDH_STATUS WINAPI PdhRemoveCounter(PDH_HCOUNTER);
209PDH_STATUS WINAPI PdhSetCounterScaleFactor(PDH_HCOUNTER, LONG);
210PDH_STATUS WINAPI PdhValidatePathA(LPCSTR);
211PDH_STATUS WINAPI PdhValidatePathW(LPCWSTR);
212#define PdhValidatePath WINELIB_NAME_AW(PdhValidatePath)
213PDH_STATUS WINAPI PdhValidatePathExA(PDH_HLOG, LPCSTR);
214PDH_STATUS WINAPI PdhValidatePathExW(PDH_HLOG, LPCWSTR);
215#define PdhValidatePathEx WINELIB_NAME_AW(PdhValidatePathEx)
216
217#ifdef __cplusplus
218}
219#endif
220
221#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