user/tests: Write-strings warnings fix.
[wine/multimedia.git] / include / evntrace.h
blobc12b7167899ab86d0f48dbb94e005e07ea789a40
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 typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE;
26 struct _EVENT_TRACE_LOGFILEA;
27 struct _EVENT_TRACE_LOGFILEW;
29 typedef struct _EVENT_TRACE_LOGFILEA EVENT_TRACE_LOGFILEA, *PEVENT_TRACE_LOGFILEA;
30 typedef struct _EVENT_TRACE_LOGFILEW EVENT_TRACE_LOGFILEW, *PEVENT_TRACE_LOGFILEW;
32 typedef ULONG (WINAPI * PEVENT_TRACE_BUFFER_CALLBACKA)( PEVENT_TRACE_LOGFILEA );
33 typedef ULONG (WINAPI * PEVENT_TRACE_BUFFER_CALLBACKW)( PEVENT_TRACE_LOGFILEW );
35 typedef ULONG (WINAPI * WMIDPREQUEST)( WMIDPREQUESTCODE, PVOID, ULONG*, PVOID );
37 typedef struct _TRACE_GUID_REGISTRATION
39 LPCGUID Guid;
40 HANDLE RegHandle;
41 } TRACE_GUID_REGISTRATION, *PTRACE_GUID_REGISTRATION;
43 typedef struct _EVENT_TRACE_HEADER
45 USHORT Size;
46 union
48 USHORT FieldTypeFlags;
49 struct
51 UCHAR HeaderType;
52 UCHAR MarkerFlags;
53 } DUMMYSTRUCTNAME;
54 } DUMMYUNIONNAME;
55 union
57 ULONG Version;
58 struct
60 UCHAR Type;
61 UCHAR Level;
62 USHORT Version;
63 } Class;
64 } DUMMYUNIONNAME1;
65 ULONG ThreadId;
66 ULONG ProcessId;
67 LARGE_INTEGER TimeStamp;
68 union
70 GUID Guid;
71 ULONGLONG GuidPtr;
72 } DUMMYUNIONNAME2;
73 union
75 struct
77 ULONG ClientContext;
78 ULONG Flags;
79 } DUMMYSTRUCTNAME1;
80 struct
82 ULONG KernelTime;
83 ULONG UserTime;
84 } DUMMYSTRUCTNAME2;
85 } DUMMYUNIONNAME3;
86 } EVENT_TRACE_HEADER, *PEVENT_TRACE_HEADER;
88 typedef struct _EVENT_TRACE
90 EVENT_TRACE_HEADER Header;
91 ULONG InstanceId;
92 ULONG ParentInstanceId;
93 GUID ParentGuid;
94 PVOID MofData;
95 ULONG MofLength;
96 ULONG ClientContext;
97 } EVENT_TRACE, *PEVENT_TRACE;
99 typedef VOID (WINAPI * PEVENT_CALLBACK)( PEVENT_TRACE );
101 typedef struct _TRACE_LOGFILE_HEADER
103 ULONG BufferSize;
104 union
106 ULONG Version;
107 struct
109 UCHAR MajorVersion;
110 UCHAR MinorVersion;
111 UCHAR SubVersion;
112 UCHAR SubMinorVersion;
113 } VersionDetail;
114 } DUMMYUNIONNAME;
115 ULONG ProviderVersion;
116 ULONG NumberOfProcessors;
117 LARGE_INTEGER EndTime;
118 ULONG TimerResolution;
119 ULONG MaximumFileSize;
120 ULONG LogFileMode;
121 ULONG BuffersWritten;
122 union
124 GUID LogInstanceGuid;
125 struct
127 ULONG StartBuffers;
128 ULONG PointerSize;
129 ULONG EventsLost;
130 ULONG CpuSpeedInMHZ;
131 } DUMMYSTRUCTNAME;
132 } DUMMYUNIONNAME1;
133 LPWSTR LoggerName;
134 LPWSTR LogFileName;
135 TIME_ZONE_INFORMATION TimeZone;
136 LARGE_INTEGER BootTime;
137 LARGE_INTEGER PerfFreq;
138 LARGE_INTEGER StartTime;
139 ULONG ReservedTime;
140 ULONG BuffersLost;
141 } TRACE_LOGFILE_HEADER, *PTRACE_LOGFILE_HEADER;
143 struct _EVENT_TRACE_LOGFILEW
145 LPWSTR LogFileName;
146 LPWSTR LoggerName;
147 LONGLONG CurrentTime;
148 ULONG LogFileMode;
149 EVENT_TRACE CurrentEvent;
150 TRACE_LOGFILE_HEADER LogfileHeader;
151 PEVENT_TRACE_BUFFER_CALLBACKW BufferCallback;
152 ULONG BufferSize;
153 ULONG Filled;
154 ULONG EventsLost;
155 PEVENT_CALLBACK EventCallback;
156 PVOID Context;
159 struct _EVENT_TRACE_LOGFILEA
161 LPSTR LogFileName;
162 LPSTR LoggerName;
163 LONGLONG CurrentTime;
164 ULONG LogFileMode;
165 EVENT_TRACE CurrentEvent;
166 TRACE_LOGFILE_HEADER LogfileHeader;
167 PEVENT_TRACE_BUFFER_CALLBACKA BufferCallback;
168 ULONG BufferSize;
169 ULONG Filled;
170 ULONG EventsLost;
171 PEVENT_CALLBACK EventCallback;
172 PVOID Context;
175 ULONG WINAPI CloseTrace(TRACEHANDLE);
176 ULONG WINAPI EnableTrace(ULONG,ULONG,ULONG,LPCGUID,TRACEHANDLE);
177 ULONG WINAPI RegisterTraceGuidsA(WMIDPREQUEST,PVOID,LPCGUID,ULONG,PTRACE_GUID_REGISTRATION,LPCSTR,LPCSTR,PTRACEHANDLE);
178 ULONG WINAPI RegisterTraceGuidsW(WMIDPREQUEST,PVOID,LPCGUID,ULONG,PTRACE_GUID_REGISTRATION,LPCWSTR,LPCWSTR,PTRACEHANDLE);
179 #define RegisterTraceGuids WINELIB_NAME_AW(RegisterTraceGuids)
181 #endif /* _EVNTRACE_ */