d3d10core: Add support for map_type flags D3D10_MAP_READ, D3D10_MAP_WRITE_NO_OVERWRIT...
[wine.git] / include / evntrace.h
blobcc442dcc8f48573c7f703e0e1837b4233de174e1
1 /*
2 * Copyright (C) 2005 Mike McCormack
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef _EVNTRACE_
20 #define _EVNTRACE_
22 #include <guiddef.h>
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 #define EVENT_TRACE_CONTROL_QUERY 0
29 #define EVENT_TRACE_CONTROL_STOP 1
30 #define EVENT_TRACE_CONTROL_UPDATE 2
31 #define EVENT_TRACE_CONTROL_FLUSH 3
33 #define TRACE_LEVEL_NONE 0
34 #define TRACE_LEVEL_CRITICAL 1
35 #define TRACE_LEVEL_FATAL 1
36 #define TRACE_LEVEL_ERROR 2
37 #define TRACE_LEVEL_WARNING 3
38 #define TRACE_LEVEL_INFORMATION 4
39 #define TRACE_LEVEL_VERBOSE 5
41 typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE;
43 struct _EVENT_TRACE_LOGFILEA;
44 struct _EVENT_TRACE_LOGFILEW;
46 typedef struct _EVENT_TRACE_LOGFILEA EVENT_TRACE_LOGFILEA, *PEVENT_TRACE_LOGFILEA;
47 typedef struct _EVENT_TRACE_LOGFILEW EVENT_TRACE_LOGFILEW, *PEVENT_TRACE_LOGFILEW;
49 typedef ULONG (WINAPI * PEVENT_TRACE_BUFFER_CALLBACKA)( PEVENT_TRACE_LOGFILEA );
50 typedef ULONG (WINAPI * PEVENT_TRACE_BUFFER_CALLBACKW)( PEVENT_TRACE_LOGFILEW );
52 typedef ULONG (WINAPI * WMIDPREQUEST)( WMIDPREQUESTCODE, PVOID, ULONG*, PVOID );
54 typedef struct _TRACE_GUID_REGISTRATION
56 LPCGUID Guid;
57 HANDLE RegHandle;
58 } TRACE_GUID_REGISTRATION, *PTRACE_GUID_REGISTRATION;
60 typedef struct _TRACE_GUID_PROPERTIES {
61 GUID Guid;
62 ULONG GuidType;
63 ULONG LoggerId;
64 ULONG EnableLevel;
65 ULONG EnableFlags;
66 BOOLEAN IsEnable;
67 } TRACE_GUID_PROPERTIES, *PTRACE_GUID_PROPERTIES;
69 typedef struct _EVENT_TRACE_HEADER
71 USHORT Size;
72 union
74 USHORT FieldTypeFlags;
75 struct
77 UCHAR HeaderType;
78 UCHAR MarkerFlags;
79 } DUMMYSTRUCTNAME;
80 } DUMMYUNIONNAME;
81 union
83 ULONG Version;
84 struct
86 UCHAR Type;
87 UCHAR Level;
88 USHORT Version;
89 } Class;
90 } DUMMYUNIONNAME1;
91 ULONG ThreadId;
92 ULONG ProcessId;
93 LARGE_INTEGER TimeStamp;
94 union
96 GUID Guid;
97 ULONGLONG GuidPtr;
98 } DUMMYUNIONNAME2;
99 union
101 struct
103 ULONG ClientContext;
104 ULONG Flags;
105 } DUMMYSTRUCTNAME1;
106 struct
108 ULONG KernelTime;
109 ULONG UserTime;
110 } DUMMYSTRUCTNAME2;
111 } DUMMYUNIONNAME3;
112 } EVENT_TRACE_HEADER, *PEVENT_TRACE_HEADER;
114 typedef struct _EVENT_TRACE
116 EVENT_TRACE_HEADER Header;
117 ULONG InstanceId;
118 ULONG ParentInstanceId;
119 GUID ParentGuid;
120 PVOID MofData;
121 ULONG MofLength;
122 ULONG ClientContext;
123 } EVENT_TRACE, *PEVENT_TRACE;
125 typedef VOID (WINAPI * PEVENT_CALLBACK)( PEVENT_TRACE );
127 typedef struct _TRACE_LOGFILE_HEADER
129 ULONG BufferSize;
130 union
132 ULONG Version;
133 struct
135 UCHAR MajorVersion;
136 UCHAR MinorVersion;
137 UCHAR SubVersion;
138 UCHAR SubMinorVersion;
139 } VersionDetail;
140 } DUMMYUNIONNAME;
141 ULONG ProviderVersion;
142 ULONG NumberOfProcessors;
143 LARGE_INTEGER EndTime;
144 ULONG TimerResolution;
145 ULONG MaximumFileSize;
146 ULONG LogFileMode;
147 ULONG BuffersWritten;
148 union
150 GUID LogInstanceGuid;
151 struct
153 ULONG StartBuffers;
154 ULONG PointerSize;
155 ULONG EventsLost;
156 ULONG CpuSpeedInMHZ;
157 } DUMMYSTRUCTNAME;
158 } DUMMYUNIONNAME1;
159 LPWSTR LoggerName;
160 LPWSTR LogFileName;
161 TIME_ZONE_INFORMATION TimeZone;
162 LARGE_INTEGER BootTime;
163 LARGE_INTEGER PerfFreq;
164 LARGE_INTEGER StartTime;
165 ULONG ReservedTime;
166 ULONG BuffersLost;
167 } TRACE_LOGFILE_HEADER, *PTRACE_LOGFILE_HEADER;
169 struct _EVENT_TRACE_LOGFILEW
171 LPWSTR LogFileName;
172 LPWSTR LoggerName;
173 LONGLONG CurrentTime;
174 ULONG LogFileMode;
175 EVENT_TRACE CurrentEvent;
176 TRACE_LOGFILE_HEADER LogfileHeader;
177 PEVENT_TRACE_BUFFER_CALLBACKW BufferCallback;
178 ULONG BufferSize;
179 ULONG Filled;
180 ULONG EventsLost;
181 PEVENT_CALLBACK EventCallback;
182 PVOID Context;
185 struct _EVENT_TRACE_LOGFILEA
187 LPSTR LogFileName;
188 LPSTR LoggerName;
189 LONGLONG CurrentTime;
190 ULONG LogFileMode;
191 EVENT_TRACE CurrentEvent;
192 TRACE_LOGFILE_HEADER LogfileHeader;
193 PEVENT_TRACE_BUFFER_CALLBACKA BufferCallback;
194 ULONG BufferSize;
195 ULONG Filled;
196 ULONG EventsLost;
197 PEVENT_CALLBACK EventCallback;
198 PVOID Context;
201 typedef struct _EVENT_TRACE_PROPERTIES
203 WNODE_HEADER Wnode;
204 ULONG BufferSize;
205 ULONG MinimumBuffers;
206 ULONG MaximumBuffers;
207 ULONG MaximumFileSize;
208 ULONG LogFileMode;
209 ULONG FlushTimer;
210 LONG AgeLimit;
211 ULONG NumberOfBuffers;
212 ULONG FreeBuffers;
213 ULONG EventsLost;
214 ULONG BuffersWritten;
215 ULONG LogBuffersLost;
216 ULONG RealTimeBuffersLost;
217 HANDLE LoggerThreadId;
218 ULONG LoggerFileNameOffset;
219 ULONG LoggerNameOffset;
220 } EVENT_TRACE_PROPERTIES, *PEVENT_TRACE_PROPERTIES;
222 #define INVALID_PROCESSTRACE_HANDLE ((TRACEHANDLE)~(ULONG_PTR)0)
224 ULONG WINAPI CloseTrace(TRACEHANDLE);
225 ULONG WINAPI ControlTraceA(TRACEHANDLE,LPCSTR,PEVENT_TRACE_PROPERTIES,ULONG);
226 ULONG WINAPI ControlTraceW(TRACEHANDLE,LPCWSTR,PEVENT_TRACE_PROPERTIES,ULONG);
227 #define ControlTrace WINELIB_NAME_AW(ControlTrace)
228 ULONG WINAPI EnableTrace(ULONG,ULONG,ULONG,LPCGUID,TRACEHANDLE);
229 ULONG WINAPI FlushTraceA(TRACEHANDLE,LPCSTR,PEVENT_TRACE_PROPERTIES);
230 ULONG WINAPI FlushTraceW(TRACEHANDLE,LPCWSTR,PEVENT_TRACE_PROPERTIES);
231 #define FlushTrace WINELIB_NAME_AW(FlushTrace)
232 ULONG WINAPI GetTraceEnableFlags(TRACEHANDLE);
233 UCHAR WINAPI GetTraceEnableLevel(TRACEHANDLE);
234 TRACEHANDLE WINAPI GetTraceLoggerHandle(PVOID);
235 ULONG WINAPI QueryAllTracesA(PEVENT_TRACE_PROPERTIES*,ULONG,PULONG);
236 ULONG WINAPI QueryAllTracesW(PEVENT_TRACE_PROPERTIES*,ULONG,PULONG);
237 #define QueryAllTraces WINELIB_NAME_AW(QueryAllTraces)
238 ULONG WINAPI RegisterTraceGuidsA(WMIDPREQUEST,PVOID,LPCGUID,ULONG,PTRACE_GUID_REGISTRATION,LPCSTR,LPCSTR,PTRACEHANDLE);
239 ULONG WINAPI RegisterTraceGuidsW(WMIDPREQUEST,PVOID,LPCGUID,ULONG,PTRACE_GUID_REGISTRATION,LPCWSTR,LPCWSTR,PTRACEHANDLE);
240 #define RegisterTraceGuids WINELIB_NAME_AW(RegisterTraceGuids)
241 ULONG WINAPI StartTraceA(PTRACEHANDLE,LPCSTR,PEVENT_TRACE_PROPERTIES);
242 ULONG WINAPI StartTraceW(PTRACEHANDLE,LPCWSTR,PEVENT_TRACE_PROPERTIES);
243 #define StartTrace WINELIB_NAME_AW(StartTrace)
244 ULONG WINAPI TraceEvent(TRACEHANDLE,PEVENT_TRACE_HEADER);
245 ULONG WINAPIV TraceMessage(TRACEHANDLE,ULONG,LPGUID,USHORT,...);
246 ULONG WINAPI TraceMessageVa(TRACEHANDLE,ULONG,LPGUID,USHORT,__ms_va_list);
247 ULONG WINAPI UnregisterTraceGuids(TRACEHANDLE);
249 #ifdef __cplusplus
251 #endif
253 #endif /* _EVNTRACE_ */