wined3d: Get rid of a superfluous cast.
[wine.git] / include / relogger.idl
blob60e04512ee0cb357d21329e04b322903cadc3dad
1 /*
2 * Copyright 2021 Jacek Caban for CodeWeavers
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 import "unknwn.idl";
20 import "oaidl.idl";
21 import "ocidl.idl";
23 #ifndef __WIDL__
24 #define threading(model)
25 #endif
27 typedef struct _EVENT_DESCRIPTOR
29 USHORT Id;
30 UCHAR Version;
31 UCHAR Channel;
32 UCHAR Level;
33 UCHAR Opcode;
34 USHORT Task;
35 ULONGLONG Keyword;
36 } EVENT_DESCRIPTOR, *PEVENT_DESCRIPTOR;
37 typedef const EVENT_DESCRIPTOR *PCEVENT_DESCRIPTOR;
39 typedef struct _EVENT_HEADER
41 USHORT Size;
42 USHORT HeaderType;
43 USHORT Flags;
44 USHORT EventProperty;
45 ULONG ThreadId;
46 ULONG ProcessId;
47 LARGE_INTEGER TimeStamp;
48 GUID ProviderId;
49 EVENT_DESCRIPTOR EventDescriptor;
50 union {
51 struct {
52 ULONG KernelTime;
53 ULONG UserTime;
54 } DUMMYSTRUCTNAME;
55 ULONG64 ProcessorTime;
56 } DUMMYUNIONNAME;
57 GUID ActivityId;
58 } EVENT_HEADER, *PEVENT_HEADER;
60 typedef struct _ETW_BUFFER_CONTEXT
62 union {
63 struct {
64 UCHAR ProcessorNumber;
65 UCHAR Alignment;
66 } DUMMYSTRUCTNAME;
67 USHORT ProcessorIndex;
68 } DUMMYUNIONNAME;
69 USHORT LoggerId;
70 } ETW_BUFFER_CONTEXT, *PETW_BUFFER_CONTEXT;
72 typedef struct _EVENT_HEADER_EXTENDED_DATA_ITEM
74 USHORT Reserved1;
75 USHORT ExtType;
76 USHORT Linkage;
77 USHORT DataSize;
78 ULONGLONG DataPtr;
79 } EVENT_HEADER_EXTENDED_DATA_ITEM, *PEVENT_HEADER_EXTENDED_DATA_ITEM;
81 typedef struct _EVENT_RECORD
83 EVENT_HEADER EventHeader;
84 ETW_BUFFER_CONTEXT BufferContext;
85 USHORT ExtendedDataCount;
86 USHORT UserDataLength;
87 EVENT_HEADER_EXTENDED_DATA_ITEM *ExtendedData;
88 void *UserData;
89 void *UserContext;
90 } EVENT_RECORD, *PEVENT_RECORD;
92 typedef ULONG64 TRACEHANDLE, *PTRACEHANDLE;
95 object,
96 uuid(8cc97f40-9028-4ff3-9b62-7d1f79ca7bcb),
97 local
99 interface ITraceEvent : IUnknown
101 HRESULT Clone([out, retval] ITraceEvent **NewEvent);
103 HRESULT GetUserContext([out, retval] void **UserContext);
105 HRESULT GetEventRecord([out, retval] PEVENT_RECORD *EventRecord);
107 HRESULT SetPayload([in, size_is(PayloadSize)] BYTE *Payload,
108 [in] ULONG PayloadSize);
110 HRESULT SetEventDescriptor([in] PCEVENT_DESCRIPTOR EventDescriptor);
112 HRESULT SetProcessId([in] ULONG ProcessId);
114 HRESULT SetProcessorIndex([in] ULONG ProcessorIndex);
116 HRESULT SetThreadId([in] ULONG ThreadId);
118 HRESULT SetThreadTimes([in] ULONG KernelTime,
119 [in] ULONG UserTime);
121 HRESULT SetActivityId([in] LPCGUID ActivityId);
123 HRESULT SetTimeStamp([in] LARGE_INTEGER *TimeStamp);
125 HRESULT SetProviderId([in] LPCGUID ProviderId);
128 interface ITraceRelogger;
131 object,
132 uuid(3ed25501-593f-43e9-8f38-3ab46f5a4a52)
134 interface ITraceEventCallback : IUnknown
136 HRESULT OnBeginProcessTrace([in] ITraceEvent *HeaderEvent,
137 [in] ITraceRelogger *Relogger);
139 HRESULT OnFinalizeProcessTrace([in] ITraceRelogger *Relogger);
141 HRESULT OnEvent([in] ITraceEvent *Event,
142 [in] ITraceRelogger *Relogger);
146 object,
147 uuid(f754ad43-3bcc-4286-8009-9c5da214e84e),
148 local
150 interface ITraceRelogger : IUnknown
152 HRESULT AddLogfileTraceStream([in] BSTR LogfileName,
153 [in] void *UserContext,
154 [out, retval] TRACEHANDLE *TraceHandle);
156 HRESULT AddRealtimeTraceStream([in] BSTR LoggerName,
157 [in] void *UserContext,
158 [out, retval] TRACEHANDLE *TraceHandle);
160 HRESULT RegisterCallback([in] ITraceEventCallback *Callback);
162 HRESULT Inject([in] ITraceEvent *Event);
164 HRESULT CreateEventInstance([in] TRACEHANDLE TraceHandle,
165 [in] ULONG Flags,
166 [out, retval] ITraceEvent **Event);
168 HRESULT ProcessTrace();
170 HRESULT SetOutputFilename([in] BSTR LogfileName);
172 HRESULT SetCompressionMode([in] BOOLEAN CompressionMode);
174 HRESULT Cancel();
178 uuid(7b40792d-05ff-44c4-9058-f440c71f17d4),
179 threading(both)
181 coclass CTraceRelogger
183 [default] interface ITraceRelogger;