lz32/tests: Try to open nonexisting compressed files.
[wine] / include / evntrace.h
1 /*
2  * Copyright (C) 2005 Mike McCormack
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #ifndef _EVNTRACE_
20 #define _EVNTRACE_
21
22 #include <guiddef.h>
23
24 typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE;
25
26 struct _EVENT_TRACE_LOGFILEA;
27 struct _EVENT_TRACE_LOGFILEW;
28
29 typedef struct _EVENT_TRACE_LOGFILEA EVENT_TRACE_LOGFILEA, *PEVENT_TRACE_LOGFILEA;
30 typedef struct _EVENT_TRACE_LOGFILEW EVENT_TRACE_LOGFILEW, *PEVENT_TRACE_LOGFILEW;
31
32 typedef ULONG (WINAPI * PEVENT_TRACE_BUFFER_CALLBACKA)( PEVENT_TRACE_LOGFILEA );
33 typedef ULONG (WINAPI * PEVENT_TRACE_BUFFER_CALLBACKW)( PEVENT_TRACE_LOGFILEW );
34
35 typedef ULONG (WINAPI * WMIDPREQUEST)( WMIDPREQUESTCODE, PVOID, ULONG*, PVOID );
36
37 typedef struct _TRACE_GUID_REGISTRATION
38 {
39     LPCGUID Guid;
40     HANDLE RegHandle;
41 } TRACE_GUID_REGISTRATION, *PTRACE_GUID_REGISTRATION;
42
43 typedef struct _EVENT_TRACE_HEADER
44 {
45     USHORT Size;
46     union
47     {
48         USHORT FieldTypeFlags;
49         struct
50         {
51             UCHAR HeaderType;
52             UCHAR MarkerFlags;
53         } DUMMYSTRUCTNAME;
54     } DUMMYUNIONNAME;
55     union
56     {
57         ULONG Version;
58         struct
59         {
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
69     {
70         GUID Guid;
71         ULONGLONG GuidPtr;
72     } DUMMYUNIONNAME2;
73     union
74     {
75         struct
76         {
77             ULONG ClientContext;
78             ULONG Flags;
79         } DUMMYSTRUCTNAME1;
80         struct
81         {
82             ULONG KernelTime;
83             ULONG UserTime;
84         } DUMMYSTRUCTNAME2;
85     } DUMMYUNIONNAME3;
86 } EVENT_TRACE_HEADER, *PEVENT_TRACE_HEADER;
87
88 typedef struct _EVENT_TRACE
89 {
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;
98
99 typedef VOID (WINAPI * PEVENT_CALLBACK)( PEVENT_TRACE );
100
101 typedef struct _TRACE_LOGFILE_HEADER
102 {
103     ULONG BufferSize;
104     union
105     {
106         ULONG Version;
107         struct 
108         {
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
123     {
124         GUID LogInstanceGuid;
125         struct
126         {
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;
142
143 struct _EVENT_TRACE_LOGFILEW
144 {
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;
157 };
158
159 struct _EVENT_TRACE_LOGFILEA
160 {
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;
173 };
174
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)
180
181 #endif /* _EVNTRACE_ */