rpcrt4: Remove WINAPI on static functions where not needed.
[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 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE;
29
30 struct _EVENT_TRACE_LOGFILEA;
31 struct _EVENT_TRACE_LOGFILEW;
32
33 typedef struct _EVENT_TRACE_LOGFILEA EVENT_TRACE_LOGFILEA, *PEVENT_TRACE_LOGFILEA;
34 typedef struct _EVENT_TRACE_LOGFILEW EVENT_TRACE_LOGFILEW, *PEVENT_TRACE_LOGFILEW;
35
36 typedef ULONG (WINAPI * PEVENT_TRACE_BUFFER_CALLBACKA)( PEVENT_TRACE_LOGFILEA );
37 typedef ULONG (WINAPI * PEVENT_TRACE_BUFFER_CALLBACKW)( PEVENT_TRACE_LOGFILEW );
38
39 typedef ULONG (WINAPI * WMIDPREQUEST)( WMIDPREQUESTCODE, PVOID, ULONG*, PVOID );
40
41 typedef struct _TRACE_GUID_REGISTRATION
42 {
43     LPCGUID Guid;
44     HANDLE RegHandle;
45 } TRACE_GUID_REGISTRATION, *PTRACE_GUID_REGISTRATION;
46
47 typedef struct _EVENT_TRACE_HEADER
48 {
49     USHORT Size;
50     union
51     {
52         USHORT FieldTypeFlags;
53         struct
54         {
55             UCHAR HeaderType;
56             UCHAR MarkerFlags;
57         } DUMMYSTRUCTNAME;
58     } DUMMYUNIONNAME;
59     union
60     {
61         ULONG Version;
62         struct
63         {
64             UCHAR Type;
65             UCHAR Level;
66             USHORT Version;
67         } Class;
68     } DUMMYUNIONNAME1;
69     ULONG ThreadId;
70     ULONG ProcessId;
71     LARGE_INTEGER TimeStamp;
72     union
73     {
74         GUID Guid;
75         ULONGLONG GuidPtr;
76     } DUMMYUNIONNAME2;
77     union
78     {
79         struct
80         {
81             ULONG ClientContext;
82             ULONG Flags;
83         } DUMMYSTRUCTNAME1;
84         struct
85         {
86             ULONG KernelTime;
87             ULONG UserTime;
88         } DUMMYSTRUCTNAME2;
89     } DUMMYUNIONNAME3;
90 } EVENT_TRACE_HEADER, *PEVENT_TRACE_HEADER;
91
92 typedef struct _EVENT_TRACE
93 {
94     EVENT_TRACE_HEADER Header;
95     ULONG InstanceId;
96     ULONG ParentInstanceId;
97     GUID ParentGuid;
98     PVOID MofData;
99     ULONG MofLength;
100     ULONG ClientContext;
101 } EVENT_TRACE, *PEVENT_TRACE;
102
103 typedef VOID (WINAPI * PEVENT_CALLBACK)( PEVENT_TRACE );
104
105 typedef struct _TRACE_LOGFILE_HEADER
106 {
107     ULONG BufferSize;
108     union
109     {
110         ULONG Version;
111         struct 
112         {
113             UCHAR MajorVersion;
114             UCHAR MinorVersion;
115             UCHAR SubVersion;
116             UCHAR SubMinorVersion;
117         } VersionDetail;
118     } DUMMYUNIONNAME;
119     ULONG ProviderVersion;
120     ULONG NumberOfProcessors;
121     LARGE_INTEGER EndTime;
122     ULONG TimerResolution;
123     ULONG MaximumFileSize;
124     ULONG LogFileMode;
125     ULONG BuffersWritten;
126     union
127     {
128         GUID LogInstanceGuid;
129         struct
130         {
131             ULONG StartBuffers;
132             ULONG PointerSize;
133             ULONG EventsLost;
134             ULONG CpuSpeedInMHZ;
135         } DUMMYSTRUCTNAME;
136     } DUMMYUNIONNAME1;
137     LPWSTR LoggerName;
138     LPWSTR LogFileName;
139     TIME_ZONE_INFORMATION TimeZone;
140     LARGE_INTEGER BootTime;
141     LARGE_INTEGER PerfFreq;
142     LARGE_INTEGER StartTime;
143     ULONG ReservedTime;
144     ULONG BuffersLost;
145 } TRACE_LOGFILE_HEADER, *PTRACE_LOGFILE_HEADER;
146
147 struct _EVENT_TRACE_LOGFILEW
148 {
149     LPWSTR LogFileName;
150     LPWSTR LoggerName;
151     LONGLONG CurrentTime;
152     ULONG LogFileMode;
153     EVENT_TRACE CurrentEvent;
154     TRACE_LOGFILE_HEADER LogfileHeader;
155     PEVENT_TRACE_BUFFER_CALLBACKW BufferCallback;
156     ULONG BufferSize;
157     ULONG Filled;
158     ULONG EventsLost;
159     PEVENT_CALLBACK EventCallback;
160     PVOID Context;
161 };
162
163 struct _EVENT_TRACE_LOGFILEA
164 {
165     LPSTR LogFileName;
166     LPSTR LoggerName;
167     LONGLONG CurrentTime;
168     ULONG LogFileMode;
169     EVENT_TRACE CurrentEvent;
170     TRACE_LOGFILE_HEADER LogfileHeader;
171     PEVENT_TRACE_BUFFER_CALLBACKA BufferCallback;
172     ULONG BufferSize;
173     ULONG Filled;
174     ULONG EventsLost;
175     PEVENT_CALLBACK EventCallback;
176     PVOID Context;
177 };
178
179 ULONG WINAPI CloseTrace(TRACEHANDLE);
180 ULONG WINAPI EnableTrace(ULONG,ULONG,ULONG,LPCGUID,TRACEHANDLE);
181 ULONG WINAPI RegisterTraceGuidsA(WMIDPREQUEST,PVOID,LPCGUID,ULONG,PTRACE_GUID_REGISTRATION,LPCSTR,LPCSTR,PTRACEHANDLE);
182 ULONG WINAPI RegisterTraceGuidsW(WMIDPREQUEST,PVOID,LPCGUID,ULONG,PTRACE_GUID_REGISTRATION,LPCWSTR,LPCWSTR,PTRACEHANDLE);
183 #define      RegisterTraceGuids WINELIB_NAME_AW(RegisterTraceGuids)
184
185 #ifdef __cplusplus
186 }
187 #endif
188
189 #endif /* _EVNTRACE_ */