VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/pdh.h

最後變更 在這個檔案是 53206,由 vboxsync 提交於 10 年 前

Devices/vmsvga: header fixes

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 8.7 KB
 
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 * Oracle 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, Oracle 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#include <windows.h>
34#include <winperf.h>
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40typedef LONG PDH_STATUS;
41typedef HANDLE PDH_HQUERY;
42typedef HANDLE PDH_HCOUNTER;
43typedef HANDLE PDH_HLOG;
44
45typedef PDH_HCOUNTER HCOUNTER;
46typedef PDH_HQUERY HQUERY;
47typedef PDH_HLOG 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
69#ifdef WINE_NO_UNICODE_MACROS
70# define DECL_PDH_TYPE_AW(name) /* nothing */
71#else /* WINE_NO_UNICODE_MACROS */
72# ifdef UNICODE
73# define DECL_PDH_TYPE_AW(name) typedef name##_W name;
74# else
75# define DECL_PDH_TYPE_AW(name) typedef name##_A name;
76# endif
77#endif /* WINE_NO_UNICODE_MACROS */
78
79typedef struct _PDH_FMT_COUNTERVALUE
80{
81 DWORD CStatus;
82 union
83 {
84 LONG longValue;
85 double doubleValue;
86 LONGLONG largeValue;
87 LPCSTR AnsiStringValue;
88 LPCWSTR WideStringValue;
89 } DUMMYUNIONNAME;
90} PDH_FMT_COUNTERVALUE, *PPDH_FMT_COUNTERVALUE;
91
92typedef struct _PDH_RAW_COUNTER
93{
94 DWORD CStatus;
95 FILETIME TimeStamp;
96 LONGLONG FirstValue;
97 LONGLONG SecondValue;
98 DWORD MultiCount;
99} PDH_RAW_COUNTER, *PPDH_RAW_COUNTER;
100
101typedef struct _PDH_COUNTER_PATH_ELEMENTS_A
102{
103 LPSTR szMachineName;
104 LPSTR szObjectName;
105 LPSTR szInstanceName;
106 LPSTR szParentInstance;
107 DWORD dwInstanceIndex;
108 LPSTR szCounterName;
109} PDH_COUNTER_PATH_ELEMENTS_A, *PPDH_COUNTER_PATH_ELEMENTS_A;
110
111typedef struct _PDH_COUNTER_PATH_ELEMENTS_W
112{
113 LPWSTR szMachineName;
114 LPWSTR szObjectName;
115 LPWSTR szInstanceName;
116 LPWSTR szParentInstance;
117 DWORD dwInstanceIndex;
118 LPWSTR szCounterName;
119} PDH_COUNTER_PATH_ELEMENTS_W, *PPDH_COUNTER_PATH_ELEMENTS_W;
120
121DECL_PDH_TYPE_AW(PDH_COUNTER_PATH_ELEMENTS)
122DECL_PDH_TYPE_AW(PPDH_COUNTER_PATH_ELEMENTS)
123
124typedef struct _PDH_DATA_ITEM_PATH_ELEMENTS_A
125{
126 LPSTR szMachineName;
127 GUID ObjectGUID;
128 DWORD dwItemId;
129 LPSTR szInstanceName;
130} PDH_DATA_ITEM_PATH_ELEMENTS_A, *PPDH_DATA_ITEM_PATH_ELEMENTS_A;
131
132typedef struct _PDH_DATA_ITEM_PATH_ELEMENTS_W
133{
134 LPWSTR szMachineName;
135 GUID ObjectGUID;
136 DWORD dwItemId;
137 LPWSTR szInstanceName;
138} PDH_DATA_ITEM_PATH_ELEMENTS_W, *PPDH_DATA_ITEM_PATH_ELEMENTS_W;
139
140DECL_PDH_TYPE_AW(PDH_DATA_ITEM_PATH_ELEMENTS)
141DECL_PDH_TYPE_AW(PPDH_DATA_ITEM_PATH_ELEMENTS)
142
143typedef struct _PDH_COUNTER_INFO_A
144{
145 DWORD dwLength;
146 DWORD dwType;
147 DWORD CVersion;
148 DWORD CStatus;
149 LONG lScale;
150 LONG lDefaultScale;
151 DWORD_PTR dwUserData;
152 DWORD_PTR dwQueryUserData;
153 LPSTR szFullPath;
154 union
155 {
156 PDH_DATA_ITEM_PATH_ELEMENTS_A DataItemPath;
157 PDH_COUNTER_PATH_ELEMENTS_A CounterPath;
158 struct
159 {
160 LPSTR szMachineName;
161 LPSTR szObjectName;
162 LPSTR szInstanceName;
163 LPSTR szParentInstance;
164 DWORD dwInstanceIndex;
165 LPSTR szCounterName;
166 } DUMMYSTRUCTNAME;
167 } DUMMYUNIONNAME;
168 LPSTR szExplainText;
169 DWORD DataBuffer[1];
170} PDH_COUNTER_INFO_A, *PPDH_COUNTER_INFO_A;
171
172typedef struct _PDH_COUNTER_INFO_W
173{
174 DWORD dwLength;
175 DWORD dwType;
176 DWORD CVersion;
177 DWORD CStatus;
178 LONG lScale;
179 LONG lDefaultScale;
180 DWORD_PTR dwUserData;
181 DWORD_PTR dwQueryUserData;
182 LPWSTR szFullPath;
183 union
184 {
185 PDH_DATA_ITEM_PATH_ELEMENTS_W DataItemPath;
186 PDH_COUNTER_PATH_ELEMENTS_W CounterPath;
187 struct
188 {
189 LPWSTR szMachineName;
190 LPWSTR szObjectName;
191 LPWSTR szInstanceName;
192 LPWSTR szParentInstance;
193 DWORD dwInstanceIndex;
194 LPWSTR szCounterName;
195 } DUMMYSTRUCTNAME;
196 } DUMMYUNIONNAME;
197 LPWSTR szExplainText;
198 DWORD DataBuffer[1];
199} PDH_COUNTER_INFO_W, *PPDH_COUNTER_INFO_W;
200
201DECL_PDH_TYPE_AW(PDH_COUNTER_INFO)
202DECL_PDH_TYPE_AW(PPDH_COUNTER_INFO)
203
204#undef DECL_PDH_TYPE_AW
205
206PDH_STATUS WINAPI PdhAddCounterA(PDH_HQUERY, LPCSTR, DWORD_PTR, PDH_HCOUNTER *);
207PDH_STATUS WINAPI PdhAddCounterW(PDH_HQUERY, LPCWSTR, DWORD_PTR, PDH_HCOUNTER *);
208#define PdhAddCounter WINELIB_NAME_AW(PdhAddCounter)
209PDH_STATUS WINAPI PdhAddEnglishCounterA(PDH_HQUERY, LPCSTR, DWORD_PTR, PDH_HCOUNTER *);
210PDH_STATUS WINAPI PdhAddEnglishCounterW(PDH_HQUERY, LPCWSTR, DWORD_PTR, PDH_HCOUNTER *);
211#define PdhAddEnglishCounter WINELIB_NAME_AW(PdhAddEnglishCounter)
212PDH_STATUS WINAPI PdhCloseQuery(PDH_HQUERY);
213PDH_STATUS WINAPI PdhCollectQueryData(PDH_HQUERY);
214PDH_STATUS WINAPI PdhCollectQueryDataEx(PDH_HQUERY, DWORD, HANDLE);
215PDH_STATUS WINAPI PdhCollectQueryDataWithTime(PDH_HQUERY,LONGLONG *);
216PDH_STATUS WINAPI PdhEnumObjectsA(LPCSTR,LPCSTR,PZZSTR,LPDWORD,DWORD,BOOL);
217PDH_STATUS WINAPI PdhEnumObjectsW(LPCWSTR,LPCWSTR,PZZWSTR,LPDWORD,DWORD,BOOL);
218#define PdhEnumObjects WINELIB_NAME_AW(PdhEnumObjects)
219PDH_STATUS WINAPI PdhEnumObjectItemsA(LPCSTR, LPCSTR, LPCSTR, LPSTR, LPDWORD, LPSTR, LPDWORD, DWORD, DWORD);
220PDH_STATUS WINAPI PdhEnumObjectItemsW(LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, LPDWORD, LPWSTR, LPDWORD, DWORD, DWORD);
221#define PdhEnumObjectItems WINELIB_NAME_AW(PdhEnumObjectItems)
222PDH_STATUS WINAPI PdhGetCounterInfoA(PDH_HCOUNTER, BOOLEAN, LPDWORD, PPDH_COUNTER_INFO_A);
223PDH_STATUS WINAPI PdhGetCounterInfoW(PDH_HCOUNTER, BOOLEAN, LPDWORD, PPDH_COUNTER_INFO_W);
224#define PdhGetCounterInfo WINELIB_NAME_AW(PdhGetCounterInfo)
225PDH_STATUS WINAPI PdhGetCounterTimeBase(PDH_HCOUNTER, LONGLONG *);
226PDH_STATUS WINAPI PdhGetDllVersion(LPDWORD);
227PDH_STATUS WINAPI PdhGetFormattedCounterValue(PDH_HCOUNTER, DWORD, LPDWORD, PPDH_FMT_COUNTERVALUE);
228PDH_STATUS WINAPI PdhGetRawCounterValue(PDH_HCOUNTER, LPDWORD, PPDH_RAW_COUNTER);
229PDH_STATUS WINAPI PdhLookupPerfIndexByNameA(LPCSTR, LPCSTR, LPDWORD);
230PDH_STATUS WINAPI PdhLookupPerfIndexByNameW(LPCWSTR, LPCWSTR, LPDWORD);
231#define PdhLookupPerfIndexByName WINELIB_NAME_AW(PdhLookupPerfIndexByName)
232PDH_STATUS WINAPI PdhLookupPerfNameByIndexA(LPCSTR, DWORD, LPSTR, LPDWORD);
233PDH_STATUS WINAPI PdhLookupPerfNameByIndexW(LPCWSTR, DWORD, LPWSTR, LPDWORD);
234#define PdhLookupPerfNameByIndex WINELIB_NAME_AW(PdhLookupPerfNameByIndex)
235PDH_STATUS WINAPI PdhMakeCounterPathA(PDH_COUNTER_PATH_ELEMENTS_A *, LPSTR, LPDWORD, DWORD);
236PDH_STATUS WINAPI PdhMakeCounterPathW(PDH_COUNTER_PATH_ELEMENTS_W *, LPWSTR, LPDWORD, DWORD);
237#define PdhMakeCounterPath WINELIB_NAME_AW(PdhMakeCounterPath)
238PDH_STATUS WINAPI PdhOpenQueryA(LPCSTR, DWORD_PTR, PDH_HQUERY *);
239PDH_STATUS WINAPI PdhOpenQueryW(LPCWSTR, DWORD_PTR, PDH_HQUERY *);
240#define PdhOpenQuery WINELIB_NAME_AW(PdhOpenQuery)
241PDH_STATUS WINAPI PdhRemoveCounter(PDH_HCOUNTER);
242PDH_STATUS WINAPI PdhSetCounterScaleFactor(PDH_HCOUNTER, LONG);
243PDH_STATUS WINAPI PdhSetDefaultRealTimeDataSource(DWORD);
244PDH_STATUS WINAPI PdhValidatePathA(LPCSTR);
245PDH_STATUS WINAPI PdhValidatePathW(LPCWSTR);
246#define PdhValidatePath WINELIB_NAME_AW(PdhValidatePath)
247PDH_STATUS WINAPI PdhValidatePathExA(PDH_HLOG, LPCSTR);
248PDH_STATUS WINAPI PdhValidatePathExW(PDH_HLOG, LPCWSTR);
249#define PdhValidatePathEx WINELIB_NAME_AW(PdhValidatePathEx)
250
251#ifdef __cplusplus
252}
253#endif
254
255#endif /* _PDH_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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