ReactOS  0.4.15-dev-1377-ga59cecd
trace.c File Reference
#include <ntdll.h>
#include <wmistr.h>
#include <evntrace.h>
#include <debug.h>
Include dependency graph for trace.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define FIXME   DPRINT1
 

Functions

ULONG CDECL EtwTraceMessage (TRACEHANDLE SessionHandle, ULONG MessageFlags, LPCGUID MessageGuid, USHORT MessageNumber,...)
 
TRACEHANDLE NTAPI EtwGetTraceLoggerHandle (PVOID Buffer)
 
ULONG NTAPI EtwTraceEvent (TRACEHANDLE SessionHandle, PEVENT_TRACE_HEADER EventTrace)
 
ULONG NTAPI EtwGetTraceEnableFlags (TRACEHANDLE TraceHandle)
 
UCHAR NTAPI EtwGetTraceEnableLevel (TRACEHANDLE TraceHandle)
 
ULONG NTAPI EtwUnregisterTraceGuids (TRACEHANDLE RegistrationHandle)
 
ULONG NTAPI EtwRegisterTraceGuidsA (WMIDPREQUEST RequestAddress, PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount, PTRACE_GUID_REGISTRATION TraceGuidReg, LPCSTR MofImagePath, LPCSTR MofResourceName, PTRACEHANDLE RegistrationHandle)
 
ULONG NTAPI EtwRegisterTraceGuidsW (WMIDPREQUEST RequestAddress, PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount, PTRACE_GUID_REGISTRATION TraceGuidReg, LPCWSTR MofImagePath, LPCWSTR MofResourceName, PTRACEHANDLE RegistrationHandle)
 
ULONG WINAPI EtwStartTraceW (PTRACEHANDLE pSessionHandle, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
 
ULONG WINAPI EtwStartTraceA (PTRACEHANDLE pSessionHandle, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
 
ULONG WINAPI EtwControlTraceW (TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
 
ULONG WINAPI EtwControlTraceA (TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
 
ULONG WINAPI EtwEnableTrace (ULONG enable, ULONG flag, ULONG level, LPCGUID guid, TRACEHANDLE hSession)
 
ULONG WINAPI EtwQueryAllTracesW (PEVENT_TRACE_PROPERTIES *parray, ULONG arraycount, PULONG psessioncount)
 
ULONG WINAPI EtwQueryAllTracesA (PEVENT_TRACE_PROPERTIES *parray, ULONG arraycount, PULONG psessioncount)
 
ULONG WINAPI EtwFlushTraceA (TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
 
ULONG WINAPI EtwFlushTraceW (TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
 
ULONG WINAPI EtwQueryTraceA (TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
 
ULONG WINAPI EtwQueryTraceW (TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
 
ULONG WINAPI EtwStopTraceA (TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
 
ULONG WINAPI EtwStopTraceW (TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
 
ULONG WINAPI EtwUpdateTraceA (TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
 
ULONG WINAPI EtwUpdateTraceW (TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties)
 

Macro Definition Documentation

◆ FIXME

#define FIXME   DPRINT1

Definition at line 13 of file trace.c.

◆ NDEBUG

#define NDEBUG

Definition at line 10 of file trace.c.

Function Documentation

◆ EtwControlTraceA()

ULONG WINAPI EtwControlTraceA ( TRACEHANDLE  hSession,
LPCSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties,
ULONG  control 
)

Definition at line 161 of file trace.c.

162 {
163  FIXME("(%I64x, %s, %p, %d) stub\n", hSession, SessionName, Properties, control);
164  return ERROR_SUCCESS;
165 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

Referenced by EtwFlushTraceA(), EtwQueryTraceA(), EtwStopTraceA(), and EtwUpdateTraceA().

◆ EtwControlTraceW()

ULONG WINAPI EtwControlTraceW ( TRACEHANDLE  hSession,
LPCWSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties,
ULONG  control 
)

Definition at line 149 of file trace.c.

150 {
151  FIXME("(%I64x, %s, %p, %d) stub\n", hSession, SessionName, Properties, control);
152  return ERROR_SUCCESS;
153 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

Referenced by EtwFlushTraceW(), EtwQueryTraceW(), EtwStopTraceW(), and EtwUpdateTraceW().

◆ EtwEnableTrace()

ULONG WINAPI EtwEnableTrace ( ULONG  enable,
ULONG  flag,
ULONG  level,
LPCGUID  guid,
TRACEHANDLE  hSession 
)

Definition at line 170 of file trace.c.

171 {
172  FIXME("(%d, 0x%x, %d, %p, %I64x): stub\n", enable, flag, level,
173  guid, hSession);
174 
175  return ERROR_SUCCESS;
176 }
GLint level
Definition: gl.h:1546
#define ERROR_SUCCESS
Definition: deptool.c:10
const GUID * guid
#define FIXME
Definition: trace.c:13
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
GLboolean enable
Definition: glext.h:11120

◆ EtwFlushTraceA()

ULONG WINAPI EtwFlushTraceA ( TRACEHANDLE  hSession,
LPCSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties 
)

Definition at line 209 of file trace.c.

210 {
211  return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH );
212 }
ULONG WINAPI EtwControlTraceA(TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
Definition: trace.c:161
#define EVENT_TRACE_CONTROL_FLUSH
Definition: evntrace.h:217

◆ EtwFlushTraceW()

ULONG WINAPI EtwFlushTraceW ( TRACEHANDLE  hSession,
LPCWSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties 
)

Definition at line 218 of file trace.c.

219 {
220  return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH );
221 }
#define EVENT_TRACE_CONTROL_FLUSH
Definition: evntrace.h:217
ULONG WINAPI EtwControlTraceW(TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
Definition: trace.c:149

◆ EtwGetTraceEnableFlags()

ULONG NTAPI EtwGetTraceEnableFlags ( TRACEHANDLE  TraceHandle)

Definition at line 67 of file trace.c.

70 {
71  FIXME("EtwGetTraceEnableFlags stub()\n");
72  return 0xFF;
73 }
#define FIXME
Definition: trace.c:13

◆ EtwGetTraceEnableLevel()

UCHAR NTAPI EtwGetTraceEnableLevel ( TRACEHANDLE  TraceHandle)

Definition at line 77 of file trace.c.

80 {
81  FIXME("EtwGetTraceEnableLevel stub()\n");
82  return 0xFF;
83 }
#define FIXME
Definition: trace.c:13

◆ EtwGetTraceLoggerHandle()

TRACEHANDLE NTAPI EtwGetTraceLoggerHandle ( PVOID  Buffer)

Definition at line 32 of file trace.c.

35 {
36  FIXME("EtwGetTraceLoggerHandle stub()\n");
37  return (TRACEHANDLE)-1;
38 }
ULONG64 TRACEHANDLE
Definition: evntrace.h:40
#define FIXME
Definition: trace.c:13

◆ EtwQueryAllTracesA()

ULONG WINAPI EtwQueryAllTracesA ( PEVENT_TRACE_PROPERTIES parray,
ULONG  arraycount,
PULONG  psessioncount 
)

Definition at line 197 of file trace.c.

198 {
199  FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
200 
201  if (psessioncount) *psessioncount = 0;
202  return ERROR_SUCCESS;
203 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

◆ EtwQueryAllTracesW()

ULONG WINAPI EtwQueryAllTracesW ( PEVENT_TRACE_PROPERTIES parray,
ULONG  arraycount,
PULONG  psessioncount 
)

Definition at line 184 of file trace.c.

185 {
186  FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
187 
188  if (psessioncount) *psessioncount = 0;
189  return ERROR_SUCCESS;
190 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

◆ EtwQueryTraceA()

ULONG WINAPI EtwQueryTraceA ( TRACEHANDLE  hSession,
LPCSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties 
)

Definition at line 227 of file trace.c.

228 {
229  return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_QUERY );
230 }
ULONG WINAPI EtwControlTraceA(TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
Definition: trace.c:161
#define EVENT_TRACE_CONTROL_QUERY
Definition: evntrace.h:213

◆ EtwQueryTraceW()

ULONG WINAPI EtwQueryTraceW ( TRACEHANDLE  hSession,
LPCWSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties 
)

Definition at line 236 of file trace.c.

237 {
238  return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_QUERY );
239 }
#define EVENT_TRACE_CONTROL_QUERY
Definition: evntrace.h:213
ULONG WINAPI EtwControlTraceW(TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
Definition: trace.c:149

◆ EtwRegisterTraceGuidsA()

ULONG NTAPI EtwRegisterTraceGuidsA ( WMIDPREQUEST  RequestAddress,
PVOID  RequestContext,
LPCGUID  ControlGuid,
ULONG  GuidCount,
PTRACE_GUID_REGISTRATION  TraceGuidReg,
LPCSTR  MofImagePath,
LPCSTR  MofResourceName,
PTRACEHANDLE  RegistrationHandle 
)

Definition at line 97 of file trace.c.

107 {
108  FIXME("EtwRegisterTraceGuidsA stub()\n");
109  return ERROR_SUCCESS;
110 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

◆ EtwRegisterTraceGuidsW()

ULONG NTAPI EtwRegisterTraceGuidsW ( WMIDPREQUEST  RequestAddress,
PVOID  RequestContext,
LPCGUID  ControlGuid,
ULONG  GuidCount,
PTRACE_GUID_REGISTRATION  TraceGuidReg,
LPCWSTR  MofImagePath,
LPCWSTR  MofResourceName,
PTRACEHANDLE  RegistrationHandle 
)

Definition at line 114 of file trace.c.

124 {
125  FIXME("EtwRegisterTraceGuidsW stub()\n");
126  return ERROR_SUCCESS;
127 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

◆ EtwStartTraceA()

ULONG WINAPI EtwStartTraceA ( PTRACEHANDLE  pSessionHandle,
LPCSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties 
)

Definition at line 136 of file trace.c.

137 {
138  FIXME("(%p, %s, %p) stub\n", pSessionHandle, SessionName, Properties);
139  if (pSessionHandle) *pSessionHandle = 0xcafe4242;
140  return ERROR_SUCCESS;
141 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

◆ EtwStartTraceW()

ULONG WINAPI EtwStartTraceW ( PTRACEHANDLE  pSessionHandle,
LPCWSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties 
)

Definition at line 129 of file trace.c.

130 {
131  FIXME("(%p, %s, %p) stub\n", pSessionHandle, SessionName, Properties);
132  if (pSessionHandle) *pSessionHandle = 0xcafe4242;
133  return ERROR_SUCCESS;
134 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

◆ EtwStopTraceA()

ULONG WINAPI EtwStopTraceA ( TRACEHANDLE  hSession,
LPCSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties 
)

Definition at line 245 of file trace.c.

246 {
247  return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_STOP );
248 }
#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

◆ EtwStopTraceW()

ULONG WINAPI EtwStopTraceW ( TRACEHANDLE  hSession,
LPCWSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties 
)

Definition at line 254 of file trace.c.

255 {
256  return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_STOP );
257 }
#define EVENT_TRACE_CONTROL_STOP
Definition: evntrace.h:214
ULONG WINAPI EtwControlTraceW(TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
Definition: trace.c:149

◆ EtwTraceEvent()

ULONG NTAPI EtwTraceEvent ( TRACEHANDLE  SessionHandle,
PEVENT_TRACE_HEADER  EventTrace 
)

Definition at line 43 of file trace.c.

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 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

◆ EtwTraceMessage()

ULONG CDECL EtwTraceMessage ( TRACEHANDLE  SessionHandle,
ULONG  MessageFlags,
LPCGUID  MessageGuid,
USHORT  MessageNumber,
  ... 
)

Definition at line 19 of file trace.c.

25 {
26  FIXME("TraceMessage()\n");
27  return ERROR_SUCCESS;
28 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

◆ EtwUnregisterTraceGuids()

ULONG NTAPI EtwUnregisterTraceGuids ( TRACEHANDLE  RegistrationHandle)

Definition at line 87 of file trace.c.

90 {
91  FIXME("EtwUnregisterTraceGuids stub()\n");
92  return ERROR_SUCCESS;
93 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME
Definition: trace.c:13

◆ EtwUpdateTraceA()

ULONG WINAPI EtwUpdateTraceA ( TRACEHANDLE  hSession,
LPCSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties 
)

Definition at line 263 of file trace.c.

264 {
265  return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_UPDATE );
266 }
ULONG WINAPI EtwControlTraceA(TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
Definition: trace.c:161
#define EVENT_TRACE_CONTROL_UPDATE
Definition: evntrace.h:215

◆ EtwUpdateTraceW()

ULONG WINAPI EtwUpdateTraceW ( TRACEHANDLE  hSession,
LPCWSTR  SessionName,
PEVENT_TRACE_PROPERTIES  Properties 
)

Definition at line 272 of file trace.c.

273 {
274  return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_UPDATE );
275 }
#define EVENT_TRACE_CONTROL_UPDATE
Definition: evntrace.h:215
ULONG WINAPI EtwControlTraceW(TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control)
Definition: trace.c:149