66f205740d9ef05fbbb9454535d870a6b69f5bc3
[reactos.git] / dll / ntdll / etw / trace.c
1 /*
2 * ntdll.dll Event Tracing Functions
3 */
4
5 #include <ntdll.h>
6
7 #include <wmistr.h>
8 #include <evntrace.h>
9
10 #define NDEBUG
11 #include <debug.h>
12
13 #define FIXME DPRINT1
14
15 /*
16 * @unimplemented
17 */
18 ULONG CDECL
19 EtwTraceMessage(
20 TRACEHANDLE SessionHandle,
21 ULONG MessageFlags,
22 LPCGUID MessageGuid,
23 USHORT MessageNumber,
24 ...)
25 {
26 FIXME("TraceMessage()\n");
27 return ERROR_SUCCESS;
28 }
29
30 TRACEHANDLE
31 NTAPI
32 EtwGetTraceLoggerHandle(
33 PVOID Buffer
34 )
35 {
36 FIXME("EtwGetTraceLoggerHandle stub()\n");
37 return (TRACEHANDLE)-1;
38 }
39
40
41 ULONG
42 NTAPI
43 EtwTraceEvent(
44 TRACEHANDLE SessionHandle,
45 PEVENT_TRACE_HEADER EventTrace
46 )
47 {
48 FIXME("EtwTraceEvent stub()\n");
49
50 if (!SessionHandle || !EventTrace)
51 {
52 /* invalid parameters */
53 return ERROR_INVALID_PARAMETER;
54 }
55
56 if (EventTrace->Size != sizeof(EVENT_TRACE_HEADER))
57 {
58 /* invalid parameter */
59 return ERROR_INVALID_PARAMETER;
60 }
61
62 return ERROR_SUCCESS;
63 }
64
65 ULONG
66 NTAPI
67 EtwGetTraceEnableFlags(
68 TRACEHANDLE TraceHandle
69 )
70 {
71 FIXME("EtwGetTraceEnableFlags stub()\n");
72 return 0xFF;
73 }
74
75 UCHAR
76 NTAPI
77 EtwGetTraceEnableLevel(
78 TRACEHANDLE TraceHandle
79 )
80 {
81 FIXME("EtwGetTraceEnableLevel stub()\n");
82 return 0xFF;
83 }
84
85 ULONG
86 NTAPI
87 EtwUnregisterTraceGuids(
88 TRACEHANDLE RegistrationHandle
89 )
90 {
91 FIXME("EtwUnregisterTraceGuids stub()\n");
92 return ERROR_SUCCESS;
93 }
94
95 ULONG
96 NTAPI
97 EtwRegisterTraceGuidsA(
98 WMIDPREQUEST RequestAddress,
99 PVOID RequestContext,
100 LPCGUID ControlGuid,
101 ULONG GuidCount,
102 PTRACE_GUID_REGISTRATION TraceGuidReg,
103 LPCSTR MofImagePath,
104 LPCSTR MofResourceName,
105 PTRACEHANDLE RegistrationHandle
106 )
107 {
108 FIXME("EtwRegisterTraceGuidsA stub()\n");
109 return ERROR_SUCCESS;
110 }
111
112 ULONG
113 NTAPI
114 EtwRegisterTraceGuidsW(
115 WMIDPREQUEST RequestAddress,
116 PVOID RequestContext,
117 LPCGUID ControlGuid,
118 ULONG GuidCount,
119 PTRACE_GUID_REGISTRATION TraceGuidReg,
120 LPCWSTR MofImagePath,
121 LPCWSTR MofResourceName,
122 PTRACEHANDLE RegistrationHandle
123 )
124 {
125 FIXME("EtwRegisterTraceGuidsW stub()\n");
126 return ERROR_SUCCESS;
127 }
128
129 ULONG WINAPI EtwStartTraceW( PTRACEHANDLE pSessionHandle, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
130 {
131 FIXME("(%p, %s, %p) stub\n", pSessionHandle, SessionName, Properties);
132 if (pSessionHandle) *pSessionHandle = 0xcafe4242;
133 return ERROR_SUCCESS;
134 }
135
136 ULONG WINAPI EtwStartTraceA( PTRACEHANDLE pSessionHandle, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
137 {
138 FIXME("(%p, %s, %p) stub\n", pSessionHandle, SessionName, Properties);
139 if (pSessionHandle) *pSessionHandle = 0xcafe4242;
140 return ERROR_SUCCESS;
141 }
142
143 /******************************************************************************
144 * EtwControlTraceW [NTDLL.@]
145 *
146 * Control a givel event trace session
147 *
148 */
149 ULONG WINAPI EtwControlTraceW( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control )
150 {
151 FIXME("(%I64x, %s, %p, %d) stub\n", hSession, SessionName, Properties, control);
152 return ERROR_SUCCESS;
153 }
154
155 /******************************************************************************
156 * EtwControlTraceA [NTDLL.@]
157 *
158 * See ControlTraceW.
159 *
160 */
161 ULONG WINAPI EtwControlTraceA( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control )
162 {
163 FIXME("(%I64x, %s, %p, %d) stub\n", hSession, SessionName, Properties, control);
164 return ERROR_SUCCESS;
165 }
166
167 /******************************************************************************
168 * EtwEnableTrace [NTDLL.@]
169 */
170 ULONG WINAPI EtwEnableTrace( ULONG enable, ULONG flag, ULONG level, LPCGUID guid, TRACEHANDLE hSession )
171 {
172 FIXME("(%d, 0x%x, %d, %p, %I64x): stub\n", enable, flag, level,
173 guid, hSession);
174
175 return ERROR_SUCCESS;
176 }
177
178 /******************************************************************************
179 * EtwQueryAllTracesW [NTDLL.@]
180 *
181 * Query information for started event trace sessions
182 *
183 */
184 ULONG WINAPI EtwQueryAllTracesW( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount )
185 {
186 FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
187
188 if (psessioncount) *psessioncount = 0;
189 return ERROR_SUCCESS;
190 }
191
192 /******************************************************************************
193 * QueryAllTracesA [NTDLL.@]
194 *
195 * See EtwQueryAllTracesA.
196 */
197 ULONG WINAPI EtwQueryAllTracesA( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount )
198 {
199 FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
200
201 if (psessioncount) *psessioncount = 0;
202 return ERROR_SUCCESS;
203 }
204
205 /* EOF */