ntoskrnl.exe: Add a stub for Ke386IoSetAccessProcess.
[wine.git] / include / evntrace.h
blob4cacc840cb40ac18dd4970fd16917f69e4966a54
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 typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE;
35 struct _EVENT_TRACE_LOGFILEA;
36 struct _EVENT_TRACE_LOGFILEW;
38 typedef struct _EVENT_TRACE_LOGFILEA EVENT_TRACE_LOGFILEA, *PEVENT_TRACE_LOGFILEA;
39 typedef struct _EVENT_TRACE_LOGFILEW EVENT_TRACE_LOGFILEW, *PEVENT_TRACE_LOGFILEW;
41 typedef ULONG (WINAPI * PEVENT_TRACE_BUFFER_CALLBACKA)( PEVENT_TRACE_LOGFILEA );
42 typedef ULONG (WINAPI * PEVENT_TRACE_BUFFER_CALLBACKW)( PEVENT_TRACE_LOGFILEW );
44 typedef ULONG (WINAPI * WMIDPREQUEST)( WMIDPREQUESTCODE, PVOID, ULONG*, PVOID );
46 typedef struct _TRACE_GUID_REGISTRATION
48 LPCGUID Guid;
49 HANDLE RegHandle;
50 } TRACE_GUID_REGISTRATION, *PTRACE_GUID_REGISTRATION;
52 typedef struct _EVENT_TRACE_HEADER
54 USHORT Size;
55 union
57 USHORT FieldTypeFlags;
58 struct
60 UCHAR HeaderType;
61 UCHAR MarkerFlags;
62 } DUMMYSTRUCTNAME;
63 } DUMMYUNIONNAME;
64 union
66 ULONG Version;
67 struct
69 UCHAR Type;
70 UCHAR Level;
71 USHORT Version;
72 } Class;
73 } DUMMYUNIONNAME1;
74 ULONG ThreadId;
75 ULONG ProcessId;
76 LARGE_INTEGER TimeStamp;
77 union
79 GUID Guid;
80 ULONGLONG GuidPtr;
81 } DUMMYUNIONNAME2;
82 union
84 struct
86 ULONG ClientContext;
87 ULONG Flags;
88 } DUMMYSTRUCTNAME1;
89 struct
91 ULONG KernelTime;
92 ULONG UserTime;
93 } DUMMYSTRUCTNAME2;
94 } DUMMYUNIONNAME3;
95 } EVENT_TRACE_HEADER, *PEVENT_TRACE_HEADER;
97 typedef struct _EVENT_TRACE
99 EVENT_TRACE_HEADER Header;
100 ULONG InstanceId;
101 ULONG ParentInstanceId;
102 GUID ParentGuid;
103 PVOID MofData;
104 ULONG MofLength;
105 ULONG ClientContext;
106 } EVENT_TRACE, *PEVENT_TRACE;
108 typedef VOID (WINAPI * PEVENT_CALLBACK)( PEVENT_TRACE );
110 typedef struct _TRACE_LOGFILE_HEADER
112 ULONG BufferSize;
113 union
115 ULONG Version;
116 struct
118 UCHAR MajorVersion;
119 UCHAR MinorVersion;
120 UCHAR SubVersion;
121 UCHAR SubMinorVersion;
122 } VersionDetail;
123 } DUMMYUNIONNAME;
124 ULONG ProviderVersion;
125 ULONG NumberOfProcessors;
126 LARGE_INTEGER EndTime;
127 ULONG TimerResolution;
128 ULONG MaximumFileSize;
129 ULONG LogFileMode;
130 ULONG BuffersWritten;
131 union
133 GUID LogInstanceGuid;
134 struct
136 ULONG StartBuffers;
137 ULONG PointerSize;
138 ULONG EventsLost;
139 ULONG CpuSpeedInMHZ;
140 } DUMMYSTRUCTNAME;
141 } DUMMYUNIONNAME1;
142 LPWSTR LoggerName;
143 LPWSTR LogFileName;
144 TIME_ZONE_INFORMATION TimeZone;
145 LARGE_INTEGER BootTime;
146 LARGE_INTEGER PerfFreq;
147 LARGE_INTEGER StartTime;
148 ULONG ReservedTime;
149 ULONG BuffersLost;
150 } TRACE_LOGFILE_HEADER, *PTRACE_LOGFILE_HEADER;
152 struct _EVENT_TRACE_LOGFILEW
154 LPWSTR LogFileName;
155 LPWSTR LoggerName;
156 LONGLONG CurrentTime;
157 ULONG LogFileMode;
158 EVENT_TRACE CurrentEvent;
159 TRACE_LOGFILE_HEADER LogfileHeader;
160 PEVENT_TRACE_BUFFER_CALLBACKW BufferCallback;
161 ULONG BufferSize;
162 ULONG Filled;
163 ULONG EventsLost;
164 PEVENT_CALLBACK EventCallback;
165 PVOID Context;
168 struct _EVENT_TRACE_LOGFILEA
170 LPSTR LogFileName;
171 LPSTR LoggerName;
172 LONGLONG CurrentTime;
173 ULONG LogFileMode;
174 EVENT_TRACE CurrentEvent;
175 TRACE_LOGFILE_HEADER LogfileHeader;
176 PEVENT_TRACE_BUFFER_CALLBACKA BufferCallback;
177 ULONG BufferSize;
178 ULONG Filled;
179 ULONG EventsLost;
180 PEVENT_CALLBACK EventCallback;
181 PVOID Context;
184 typedef struct _EVENT_TRACE_PROPERTIES
186 WNODE_HEADER Wnode;
187 ULONG BufferSize;
188 ULONG MinimumBuffers;
189 ULONG MaximumBuffers;
190 ULONG MaximumFileSize;
191 ULONG LogFileMode;
192 ULONG FlushTimer;
193 LONG AgeLimit;
194 ULONG NumberOfBuffers;
195 ULONG FreeBuffers;
196 ULONG EventsLost;
197 ULONG BuffersWritten;
198 ULONG LogBuffersLost;
199 ULONG RealTimeBuffersLost;
200 HANDLE LoggerThreadId;
201 ULONG LoggerFileNameOffset;
202 ULONG LoggerNameOffset;
203 } EVENT_TRACE_PROPERTIES, *PEVENT_TRACE_PROPERTIES;
205 #define INVALID_PROCESSTRACE_HANDLE ((TRACEHANDLE)~(ULONG_PTR)0)
207 ULONG WINAPI CloseTrace(TRACEHANDLE);
208 ULONG WINAPI ControlTraceA(TRACEHANDLE,LPCSTR,PEVENT_TRACE_PROPERTIES,ULONG);
209 ULONG WINAPI ControlTraceW(TRACEHANDLE,LPCWSTR,PEVENT_TRACE_PROPERTIES,ULONG);
210 #define ControlTrace WINELIB_NAME_AW(ControlTrace)
211 ULONG WINAPI EnableTrace(ULONG,ULONG,ULONG,LPCGUID,TRACEHANDLE);
212 ULONG WINAPI FlushTraceA(TRACEHANDLE,LPCSTR,PEVENT_TRACE_PROPERTIES);
213 ULONG WINAPI FlushTraceW(TRACEHANDLE,LPCWSTR,PEVENT_TRACE_PROPERTIES);
214 #define FlushTrace WINELIB_NAME_AW(FlushTrace)
215 ULONG WINAPI QueryAllTracesA(PEVENT_TRACE_PROPERTIES*,ULONG,PULONG);
216 ULONG WINAPI QueryAllTracesW(PEVENT_TRACE_PROPERTIES*,ULONG,PULONG);
217 #define QueryAllTraces WINELIB_NAME_AW(QueryAllTraces)
218 ULONG WINAPI RegisterTraceGuidsA(WMIDPREQUEST,PVOID,LPCGUID,ULONG,PTRACE_GUID_REGISTRATION,LPCSTR,LPCSTR,PTRACEHANDLE);
219 ULONG WINAPI RegisterTraceGuidsW(WMIDPREQUEST,PVOID,LPCGUID,ULONG,PTRACE_GUID_REGISTRATION,LPCWSTR,LPCWSTR,PTRACEHANDLE);
220 #define RegisterTraceGuids WINELIB_NAME_AW(RegisterTraceGuids)
221 ULONG WINAPI StartTraceA(PTRACEHANDLE,LPCSTR,PEVENT_TRACE_PROPERTIES);
222 ULONG WINAPI StartTraceW(PTRACEHANDLE,LPCWSTR,PEVENT_TRACE_PROPERTIES);
223 #define StartTrace WINELIB_NAME_AW(StartTrace)
224 ULONG WINAPI TraceEvent(TRACEHANDLE,PEVENT_TRACE_HEADER);
225 ULONG WINAPI UnregisterTraceGuids(TRACEHANDLE);
227 #ifdef __cplusplus
229 #endif
231 #endif /* _EVNTRACE_ */