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
28 typedef ULONG64 TRACEHANDLE
, *PTRACEHANDLE
;
30 struct _EVENT_TRACE_LOGFILEA
;
31 struct _EVENT_TRACE_LOGFILEW
;
33 typedef struct _EVENT_TRACE_LOGFILEA EVENT_TRACE_LOGFILEA
, *PEVENT_TRACE_LOGFILEA
;
34 typedef struct _EVENT_TRACE_LOGFILEW EVENT_TRACE_LOGFILEW
, *PEVENT_TRACE_LOGFILEW
;
36 typedef ULONG (WINAPI
* PEVENT_TRACE_BUFFER_CALLBACKA
)( PEVENT_TRACE_LOGFILEA
);
37 typedef ULONG (WINAPI
* PEVENT_TRACE_BUFFER_CALLBACKW
)( PEVENT_TRACE_LOGFILEW
);
39 typedef ULONG (WINAPI
* WMIDPREQUEST
)( WMIDPREQUESTCODE
, PVOID
, ULONG
*, PVOID
);
41 typedef struct _TRACE_GUID_REGISTRATION
45 } TRACE_GUID_REGISTRATION
, *PTRACE_GUID_REGISTRATION
;
47 typedef struct _EVENT_TRACE_HEADER
52 USHORT FieldTypeFlags
;
71 LARGE_INTEGER TimeStamp
;
90 } EVENT_TRACE_HEADER
, *PEVENT_TRACE_HEADER
;
92 typedef struct _EVENT_TRACE
94 EVENT_TRACE_HEADER Header
;
96 ULONG ParentInstanceId
;
101 } EVENT_TRACE
, *PEVENT_TRACE
;
103 typedef VOID (WINAPI
* PEVENT_CALLBACK
)( PEVENT_TRACE
);
105 typedef struct _TRACE_LOGFILE_HEADER
116 UCHAR SubMinorVersion
;
119 ULONG ProviderVersion
;
120 ULONG NumberOfProcessors
;
121 LARGE_INTEGER EndTime
;
122 ULONG TimerResolution
;
123 ULONG MaximumFileSize
;
125 ULONG BuffersWritten
;
128 GUID LogInstanceGuid
;
139 TIME_ZONE_INFORMATION TimeZone
;
140 LARGE_INTEGER BootTime
;
141 LARGE_INTEGER PerfFreq
;
142 LARGE_INTEGER StartTime
;
145 } TRACE_LOGFILE_HEADER
, *PTRACE_LOGFILE_HEADER
;
147 struct _EVENT_TRACE_LOGFILEW
151 LONGLONG CurrentTime
;
153 EVENT_TRACE CurrentEvent
;
154 TRACE_LOGFILE_HEADER LogfileHeader
;
155 PEVENT_TRACE_BUFFER_CALLBACKW BufferCallback
;
159 PEVENT_CALLBACK EventCallback
;
163 struct _EVENT_TRACE_LOGFILEA
167 LONGLONG CurrentTime
;
169 EVENT_TRACE CurrentEvent
;
170 TRACE_LOGFILE_HEADER LogfileHeader
;
171 PEVENT_TRACE_BUFFER_CALLBACKA BufferCallback
;
175 PEVENT_CALLBACK EventCallback
;
179 typedef struct _EVENT_TRACE_PROPERTIES
183 ULONG MinimumBuffers
;
184 ULONG MaximumBuffers
;
185 ULONG MaximumFileSize
;
189 ULONG NumberOfBuffers
;
192 ULONG BuffersWritten
;
193 ULONG LogBuffersLost
;
194 ULONG RealTimeBuffersLost
;
195 HANDLE LoggerThreadId
;
196 ULONG LoggerFileNameOffset
;
197 ULONG LoggerNameOffset
;
198 } EVENT_TRACE_PROPERTIES
, *PEVENT_TRACE_PROPERTIES
;
200 ULONG WINAPI
CloseTrace(TRACEHANDLE
);
201 ULONG WINAPI
EnableTrace(ULONG
,ULONG
,ULONG
,LPCGUID
,TRACEHANDLE
);
202 ULONG WINAPI
RegisterTraceGuidsA(WMIDPREQUEST
,PVOID
,LPCGUID
,ULONG
,PTRACE_GUID_REGISTRATION
,LPCSTR
,LPCSTR
,PTRACEHANDLE
);
203 ULONG WINAPI
RegisterTraceGuidsW(WMIDPREQUEST
,PVOID
,LPCGUID
,ULONG
,PTRACE_GUID_REGISTRATION
,LPCWSTR
,LPCWSTR
,PTRACEHANDLE
);
204 #define RegisterTraceGuids WINELIB_NAME_AW(RegisterTraceGuids)
210 #endif /* _EVNTRACE_ */