source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/tdh.h@ 1181

Last change on this file since 1181 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 6.3 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _INC_TDH
7#define _INC_TDH
8#include <evntprov.h>
9#include <evntcons.h>
10#if (_WIN32_WINNT >= 0x0600)
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef enum _EVENT_FIELD_TYPE {
17 EventKeywordInformation = 0,
18 EventLevelInformation = 1,
19 EventChannelInformation = 2,
20 EventTaskInformation = 3,
21 EventOpcodeInformation = 4,
22 EventInformationMax = 5
23} EVENT_FIELD_TYPE;
24
25typedef struct _EVENT_MAP_ENTRY {
26 ULONG OutputOffset;
27 __C89_NAMELESS union {
28 ULONG Value;
29 ULONG InputOffset;
30 };
31} EVENT_MAP_ENTRY, *PEVENT_MAP_ENTRY;
32
33typedef enum _MAP_VALUETYPE
34{
35 EVENTMAP_ENTRY_VALUETYPE_ULONG = 0,
36 EVENTMAP_ENTRY_VALUETYPE_STRING = 1
37} MAP_VALUETYPE;
38
39typedef enum _MAP_FLAGS {
40 EVENTMAP_INFO_FLAG_MANIFEST_VALUEMAP = 1,
41 EVENTMAP_INFO_FLAG_MANIFEST_BITMAP = 2,
42 EVENTMAP_INFO_FLAG_MANIFEST_PATTERNMAP = 4,
43 EVENTMAP_INFO_FLAG_WBEM_VALUEMAP = 8,
44 EVENTMAP_INFO_FLAG_WBEM_BITMAP = 16,
45 EVENTMAP_INFO_FLAG_WBEM_FLAG = 32,
46 EVENTMAP_INFO_FLAG_WBEM_NO_MAP = 64
47} MAP_FLAGS;
48
49typedef struct _EVENT_MAP_INFO {
50 ULONG NameOffset;
51 MAP_FLAGS Flag;
52 ULONG EntryCount;
53 __C89_NAMELESS union {
54 MAP_VALUETYPE MapEntryValueType;
55 ULONG FormatStringOffset;
56 };
57 EVENT_MAP_ENTRY MapEntryArray[ANYSIZE_ARRAY];
58} EVENT_MAP_INFO, *PEVENT_MAP_INFO;
59
60typedef enum _PROPERTY_FLAGS {
61 PropertyStruct = 0x1,
62 PropertyParamLength = 0x2,
63 PropertyParamCount = 0x4,
64 PropertyWBEMXmlFragment = 0x8,
65 PropertyParamFixedLength = 0x10
66} PROPERTY_FLAGS;
67
68typedef struct _EVENT_PROPERTY_INFO {
69 PROPERTY_FLAGS Flags;
70 ULONG NameOffset;
71 __C89_NAMELESS union {
72 struct {
73 USHORT InType;
74 USHORT OutType;
75 ULONG MapNameOffset;
76 } nonStructType;
77 struct {
78 USHORT StructStartIndex;
79 USHORT NumOfStructMembers;
80 ULONG padding;
81 } structType;
82 };
83 __C89_NAMELESS union {
84 USHORT count;
85 USHORT countPropertyIndex;
86 };
87 __C89_NAMELESS union {
88 USHORT length;
89 USHORT lengthPropertyIndex;
90 };
91 ULONG Reserved;
92} EVENT_PROPERTY_INFO;
93
94typedef enum _DECODING_SOURCE {
95 DecodingSourceXMLFile = 0,
96 DecodingSourceWbem = 1,
97 DecodingSourceWPP = 2
98} DECODING_SOURCE;
99
100typedef enum _TDH_CONTEXT_TYPE {
101 TDH_CONTEXT_WPP_TMFFILE = 0,
102 TDH_CONTEXT_WPP_TMFSEARCHPATH = 1,
103 TDH_CONTEXT_WPP_GMT = 2,
104 TDH_CONTEXT_POINTERSIZE = 3,
105 TDH_CONTEXT_MAXIMUM = 4
106} TDH_CONTEXT_TYPE;
107
108typedef enum _TEMPLATE_FLAGS {
109 TEMPLATE_EVENT_DATA = 1,
110 TEMPLATE_USER_DATA = 2
111} TEMPLATE_FLAGS;
112
113typedef struct _TRACE_EVENT_INFO {
114 GUID ProviderGuid;
115 GUID EventGuid;
116 EVENT_DESCRIPTOR EventDescriptor;
117 DECODING_SOURCE DecodingSource;
118 ULONG ProviderNameOffset;
119 ULONG LevelNameOffset;
120 ULONG ChannelNameOffset;
121 ULONG KeywordsNameOffset;
122 ULONG TaskNameOffset;
123 ULONG OpcodeNameOffset;
124 ULONG EventMessageOffset;
125 ULONG ProviderMessageOffset;
126 ULONG BinaryXMLOffset;
127 ULONG BinaryXMLSize;
128 ULONG ActivityIDNameOffset;
129 ULONG RelatedActivityIDNameOffset;
130 ULONG PropertyCount;
131 ULONG TopLevelPropertyCount;
132 TEMPLATE_FLAGS Flags;
133 EVENT_PROPERTY_INFO EventPropertyInfoArray[ANYSIZE_ARRAY];
134} TRACE_EVENT_INFO, *PTRACE_EVENT_INFO;
135
136typedef struct _PROPERTY_DATA_DESCRIPTOR {
137 ULONGLONG PropertyName;
138 ULONG ArrayIndex;
139 ULONG Reserved;
140} PROPERTY_DATA_DESCRIPTOR, *PPROPERTY_DATA_DESCRIPTOR;
141
142typedef struct _TRACE_PROVIDER_INFO {
143 GUID ProviderGuid;
144 ULONG SchemaSource;
145 ULONG ProviderNameOffset;
146} TRACE_PROVIDER_INFO;
147
148typedef struct _PROVIDER_ENUMERATION_INFO {
149 ULONG NumberOfProviders;
150 ULONG Padding;
151 TRACE_PROVIDER_INFO TraceProviderInfoArray[ANYSIZE_ARRAY];
152} PROVIDER_ENUMERATION_INFO, *PPROVIDER_ENUMERATION_INFO;
153
154typedef struct _PROVIDER_FIELD_INFO {
155 ULONG NameOffset;
156 ULONG DescriptionOffset;
157 ULONGLONG Value;
158} PROVIDER_FIELD_INFO;
159
160typedef struct _PROVIDER_FIELD_INFOARRAY {
161 ULONG NumberOfElements;
162 EVENT_FIELD_TYPE FieldType;
163 PROVIDER_FIELD_INFO FieldInfoArray[ANYSIZE_ARRAY];
164} PROVIDER_FIELD_INFOARRAY, *PPROVIDER_FIELD_INFOARRAY;
165
166typedef struct _TDH_CONTEXT {
167 ULONGLONG ParameterValue;
168 TDH_CONTEXT_TYPE ParameterType;
169 ULONG ParameterSize;
170} TDH_CONTEXT, *PTDH_CONTEXT;
171
172ULONG __stdcall TdhEnumerateProviderFieldInformation(
173 LPGUID pGuid,
174 EVENT_FIELD_TYPE EventFieldType,
175 PPROVIDER_FIELD_INFOARRAY pBuffer,
176 ULONG *pBufferSize
177);
178
179ULONG __stdcall TdhEnumerateProviders(
180 PPROVIDER_ENUMERATION_INFO pBuffer,
181 ULONG *pBufferSize
182);
183
184ULONG __stdcall TdhGetEventInformation(
185 PEVENT_RECORD pEvent,
186 ULONG TdhContextCount,
187 PTDH_CONTEXT pTdhContext,
188 PTRACE_EVENT_INFO pBuffer,
189 ULONG *pBufferSize
190);
191
192ULONG __stdcall TdhGetEventMapInformation(
193 PEVENT_RECORD pEvent,
194 LPWSTR pMapName,
195 PEVENT_MAP_INFO pBuffer,
196 ULONG *pBufferSize
197);
198
199ULONG __stdcall TdhGetProperty(
200 PEVENT_RECORD pEvent,
201 ULONG TdhContextCount,
202 PTDH_CONTEXT pTdhContext,
203 ULONG PropertyDataCount,
204 PPROPERTY_DATA_DESCRIPTOR pPropertyData,
205 ULONG BufferSize,
206 PBYTE pBuffer
207);
208
209ULONG __stdcall TdhGetPropertySize(
210 PEVENT_RECORD pEvent,
211 ULONG TdhContextCount,
212 PTDH_CONTEXT pTdhContext,
213 ULONG PropertyDataCount,
214 PPROPERTY_DATA_DESCRIPTOR pPropertyData,
215 ULONG *pPropertySize
216);
217
218ULONG __stdcall TdhQueryProviderFieldInformation(
219 LPGUID pGuid,
220 ULONGLONG EventFieldValue,
221 EVENT_FIELD_TYPE EventFieldType,
222 PPROVIDER_FIELD_INFOARRAY pBuffer,
223 ULONG *pBufferSize
224);
225
226#if (_WIN32_WINNT >= 0x0601)
227typedef struct _PROVIDER_FILTER_INFO {
228 UCHAR Id;
229 UCHAR Version;
230 ULONG MessageOffset;
231 ULONG Reserved;
232 ULONG PropertyCount;
233 EVENT_PROPERTY_INFO EventPropertyInfoArray[ANYSIZE_ARRAY];
234} PROVIDER_FILTER_INFO, *PPROVIDER_FILTER_INFO;
235#endif /*(_WIN32_WINNT >= 0x0601)*/
236
237#ifdef __cplusplus
238}
239#endif
240
241#endif /*(_WIN32_WINNT >= 0x0600)*/
242#endif /*_INC_TDH*/
Note: See TracBrowser for help on using the repository browser.