ReactOS  0.4.15-dev-1647-g91fceab
trace.c
Go to the documentation of this file.
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  */
20  TRACEHANDLE SessionHandle,
21  ULONG MessageFlags,
22  LPCGUID MessageGuid,
24  ...)
25 {
26  FIXME("TraceMessage()\n");
27  return ERROR_SUCCESS;
28 }
29 
31 NTAPI
34 )
35 {
36  FIXME("EtwGetTraceLoggerHandle stub()\n");
37  return (TRACEHANDLE)-1;
38 }
39 
40 
41 ULONG
42 NTAPI
44  TRACEHANDLE SessionHandle,
45  PEVENT_TRACE_HEADER EventTrace
46 )
47 {
48  FIXME("EtwTraceEvent stub()\n");
49 
50  if (!SessionHandle || !EventTrace)
51  {
52  /* invalid parameters */
54  }
55 
56  if (EventTrace->Size != sizeof(EVENT_TRACE_HEADER))
57  {
58  /* invalid parameter */
60  }
61 
62  return ERROR_SUCCESS;
63 }
64 
65 ULONG
66 NTAPI
68  TRACEHANDLE TraceHandle
69 )
70 {
71  FIXME("EtwGetTraceEnableFlags stub()\n");
72  return 0xFF;
73 }
74 
75 UCHAR
76 NTAPI
78  TRACEHANDLE TraceHandle
79 )
80 {
81  FIXME("EtwGetTraceEnableLevel stub()\n");
82  return 0xFF;
83 }
84 
85 ULONG
86 NTAPI
89 )
90 {
91  FIXME("EtwUnregisterTraceGuids stub()\n");
92  return ERROR_SUCCESS;
93 }
94 
95 ULONG
96 NTAPI
98  WMIDPREQUEST RequestAddress,
99  PVOID RequestContext,
100  LPCGUID ControlGuid,
101  ULONG GuidCount,
102  PTRACE_GUID_REGISTRATION TraceGuidReg,
103  LPCSTR MofImagePath,
106 )
107 {
108  FIXME("EtwRegisterTraceGuidsA stub()\n");
109  return ERROR_SUCCESS;
110 }
111 
112 ULONG
113 NTAPI
115  WMIDPREQUEST RequestAddress,
116  PVOID RequestContext,
117  LPCGUID ControlGuid,
118  ULONG GuidCount,
119  PTRACE_GUID_REGISTRATION TraceGuidReg,
120  LPCWSTR MofImagePath,
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  */
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 /******************************************************************************
206  * EtwFlushTraceA [NTDLL.@]
207  *
208  */
210 {
211  return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH );
212 }
213 
214 /******************************************************************************
215  * EtwFlushTraceW [NTDLL.@]
216  *
217  */
219 {
220  return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH );
221 }
222 
223 /******************************************************************************
224  * EtwQueryTraceA [NTDLL.@]
225  *
226  */
228 {
229  return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_QUERY );
230 }
231 
232 /******************************************************************************
233  * EtwQueryTraceW [NTDLL.@]
234  *
235  */
237 {
238  return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_QUERY );
239 }
240 
241 /******************************************************************************
242  * EtwStopTraceA [NTDLL.@]
243  *
244  */
246 {
247  return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_STOP );
248 }
249 
250 /******************************************************************************
251  * EtwStopTraceW [NTDLL.@]
252  *
253  */
255 {
256  return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_STOP );
257 }
258 
259 /******************************************************************************
260  * EtwUpdateTraceA [NTDLL.@]
261  *
262  */
264 {
265  return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_UPDATE );
266 }
267 
268 /******************************************************************************
269  * EtwUpdateTraceW [NTDLL.@]
270  *
271  */
273 {
274  return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_UPDATE );
275 }
276 
277 /* EOF */
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
GLint level
Definition: gl.h:1546
TRACEHANDLE NTAPI EtwGetTraceLoggerHandle(PVOID Buffer)
Definition: trace.c:32
ULONG WINAPI EtwUpdateTraceW(TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
Definition: trace.c:272
ULONG64 TRACEHANDLE
Definition: evntrace.h:40
#define ERROR_SUCCESS
Definition: deptool.c:10
ULONG NTAPI EtwRegisterTraceGuidsA(WMIDPREQUEST RequestAddress, PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount, PTRACE_GUID_REGISTRATION TraceGuidReg, LPCSTR MofImagePath, LPCSTR MofResourceName, PTRACEHANDLE RegistrationHandle)
Definition: trace.c:97
ULONG WINAPI EtwStartTraceA(PTRACEHANDLE pSessionHandle, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
Definition: trace.c:136
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
ULONG NTAPI EtwUnregisterTraceGuids(TRACEHANDLE RegistrationHandle)
Definition: trace.c:87
ULONG WINAPI EtwFlushTraceA(TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
Definition: trace.c:209
ULONG NTAPI EtwGetTraceEnableFlags(TRACEHANDLE TraceHandle)
Definition: trace.c:67
ULONG WINAPI EtwQueryAllTracesW(PEVENT_TRACE_PROPERTIES *parray, ULONG arraycount, PULONG psessioncount)
Definition: trace.c:184
ULONG NTAPI EtwRegisterTraceGuidsW(WMIDPREQUEST RequestAddress, PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount, PTRACE_GUID_REGISTRATION TraceGuidReg, LPCWSTR MofImagePath, LPCWSTR MofResourceName, PTRACEHANDLE RegistrationHandle)
Definition: trace.c:114
const GUID * guid
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
ULONG WINAPI EtwQueryTraceA(TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
Definition: trace.c:227
#define EVENT_TRACE_CONTROL_STOP
Definition: evntrace.h:214
ULONG WINAPI EtwControlTraceA(TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
Definition: trace.c:161
ULONG WINAPI EtwQueryTraceW(TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
Definition: trace.c:236
#define EVENT_TRACE_CONTROL_UPDATE
Definition: evntrace.h:215
Definition: bufpool.h:45
const char * LPCSTR
Definition: xmlstorage.h:183
ULONG WINAPI EtwUpdateTraceA(TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
Definition: trace.c:263
#define FIXME
Definition: trace.c:13
#define WINAPI
Definition: msvc.h:6
UCHAR NTAPI EtwGetTraceEnableLevel(TRACEHANDLE TraceHandle)
Definition: trace.c:77
ULONG64 * PTRACEHANDLE
Definition: evntrace.h:40
unsigned char UCHAR
Definition: xmlstorage.h:181
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
ULONG WINAPI EtwFlushTraceW(TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
Definition: trace.c:218
#define EVENT_TRACE_CONTROL_QUERY
Definition: evntrace.h:213
_Outptr_ PVOID * RegistrationHandle
Definition: obfuncs.h:138
ULONG WINAPI EtwQueryAllTracesA(PEVENT_TRACE_PROPERTIES *parray, ULONG arraycount, PULONG psessioncount)
Definition: trace.c:197
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING MofResourceName
Definition: wdfdevice.h:2461
ULONG WINAPI EtwStopTraceW(TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
Definition: trace.c:254
#define EVENT_TRACE_CONTROL_FLUSH
Definition: evntrace.h:217
GLboolean enable
Definition: glext.h:11120
#define CDECL
Definition: compat.h:29
unsigned short USHORT
Definition: pedump.c:61
ULONG WINAPI EtwStartTraceW(PTRACEHANDLE pSessionHandle, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
Definition: trace.c:129
_Must_inspect_result_ typedef _In_ ULONG _In_ ULONG MessageNumber
Definition: iotypes.h:4299
unsigned int * PULONG
Definition: retypes.h:1
unsigned int ULONG
Definition: retypes.h:1
ULONG CDECL EtwTraceMessage(TRACEHANDLE SessionHandle, ULONG MessageFlags, LPCGUID MessageGuid, USHORT MessageNumber,...)
Definition: trace.c:19
ULONG(WINAPI * WMIDPREQUEST)(IN WMIDPREQUESTCODE RequestCode, IN PVOID RequestContext, IN OUT ULONG *BufferSize, IN OUT PVOID Buffer)
Definition: evntrace.h:620
ULONG WINAPI EtwControlTraceW(TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
Definition: trace.c:149
ULONG WINAPI EtwEnableTrace(ULONG enable, ULONG flag, ULONG level, LPCGUID guid, TRACEHANDLE hSession)
Definition: trace.c:170
ULONG NTAPI EtwTraceEvent(TRACEHANDLE SessionHandle, PEVENT_TRACE_HEADER EventTrace)
Definition: trace.c:43
ULONG WINAPI EtwStopTraceA(TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
Definition: trace.c:245