https://git.reactos.org/?p=reactos.git;a=commitdiff;h=de7c959c4e5f287c81e61…
commit de7c959c4e5f287c81e61c7e369a5f0ae2c33398
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sun Dec 9 10:29:02 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sun Dec 9 10:29:02 2018 +0100
[NTDLL] Implement the Etw*Trace functions relying on EtwControlTrace
---
dll/ntdll/def/ntdll.spec | 16 +++++------
dll/ntdll/etw/trace.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+), 8 deletions(-)
diff --git a/dll/ntdll/def/ntdll.spec b/dll/ntdll/def/ntdll.spec
index 04103df6f9..8ac2146030 100644
--- a/dll/ntdll/def/ntdll.spec
+++ b/dll/ntdll/def/ntdll.spec
@@ -48,8 +48,8 @@
48 stdcall -stub EtwCreateTraceInstanceId(ptr ptr)
49 stdcall EtwEnableTrace(long long long ptr double)
50 stdcall -stub EtwEnumerateTraceGuids(ptr long ptr)
-51 stdcall -stub EtwFlushTraceA(double str ptr)
-52 stdcall -stub EtwFlushTraceW(double wstr ptr)
+51 stdcall EtwFlushTraceA(double str ptr)
+52 stdcall EtwFlushTraceW(double wstr ptr)
53 stdcall EtwGetTraceEnableFlags(double)
54 stdcall EtwGetTraceEnableLevel(double)
55 stdcall EtwGetTraceLoggerHandle(ptr)
@@ -57,23 +57,23 @@
57 stdcall -stub EtwNotificationRegistrationW(ptr long ptr long long)
58 stdcall EtwQueryAllTracesA(ptr long ptr)
59 stdcall EtwQueryAllTracesW(ptr long ptr)
-60 stdcall -stub EtwQueryTraceA(double str ptr)
-61 stdcall -stub EtwQueryTraceW(double wstr ptr)
+60 stdcall EtwQueryTraceA(double str ptr)
+61 stdcall EtwQueryTraceW(double wstr ptr)
62 stdcall -stub EtwReceiveNotificationsA(long long long long)
63 stdcall -stub EtwReceiveNotificationsW(long long long long)
64 stdcall EtwRegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr)
65 stdcall EtwRegisterTraceGuidsW(ptr ptr ptr long ptr wstr wstr ptr)
66 stdcall EtwStartTraceA(ptr str ptr)
67 stdcall EtwStartTraceW(ptr wstr ptr)
-68 stdcall -stub EtwStopTraceA(double str ptr)
-69 stdcall -stub EtwStopTraceW(double wstr ptr)
+68 stdcall EtwStopTraceA(double str ptr)
+69 stdcall EtwStopTraceW(double wstr ptr)
70 stdcall EtwTraceEvent(double ptr)
71 stdcall -stub EtwTraceEventInstance(double ptr ptr ptr)
72 varargs EtwTraceMessage(ptr long ptr long)
73 stdcall -stub EtwTraceMessageVa(double long ptr long ptr)
74 stdcall EtwUnregisterTraceGuids(double)
-75 stdcall -stub EtwUpdateTraceA(double str ptr)
-76 stdcall -stub EtwUpdateTraceW(double wstr ptr)
+75 stdcall EtwUpdateTraceA(double str ptr)
+76 stdcall EtwUpdateTraceW(double wstr ptr)
77 stdcall -stub EtwpGetTraceBuffer(long long long long)
78 stdcall -stub EtwpSetHWConfigFunction(ptr long)
79 stdcall -arch=i386 KiFastSystemCall()
diff --git a/dll/ntdll/etw/trace.c b/dll/ntdll/etw/trace.c
index 66f205740d..e52619aef1 100644
--- a/dll/ntdll/etw/trace.c
+++ b/dll/ntdll/etw/trace.c
@@ -202,4 +202,76 @@ ULONG WINAPI EtwQueryAllTracesA( PEVENT_TRACE_PROPERTIES * parray,
ULONG arrayco
return ERROR_SUCCESS;
}
+/******************************************************************************
+ * EtwFlushTraceA [NTDLL.@]
+ *
+ */
+ULONG WINAPI EtwFlushTraceA( TRACEHANDLE hSession, LPCSTR SessionName,
PEVENT_TRACE_PROPERTIES Properties )
+{
+ return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH
);
+}
+
+/******************************************************************************
+ * EtwFlushTraceW [NTDLL.@]
+ *
+ */
+ULONG WINAPI EtwFlushTraceW( TRACEHANDLE hSession, LPCWSTR SessionName,
PEVENT_TRACE_PROPERTIES Properties )
+{
+ return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH
);
+}
+
+/******************************************************************************
+ * EtwQueryTraceA [NTDLL.@]
+ *
+ */
+ULONG WINAPI EtwQueryTraceA( TRACEHANDLE hSession, LPCSTR SessionName,
PEVENT_TRACE_PROPERTIES Properties )
+{
+ return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_QUERY
);
+}
+
+/******************************************************************************
+ * EtwQueryTraceW [NTDLL.@]
+ *
+ */
+ULONG WINAPI EtwQueryTraceW( TRACEHANDLE hSession, LPCWSTR SessionName,
PEVENT_TRACE_PROPERTIES Properties )
+{
+ return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_QUERY
);
+}
+
+/******************************************************************************
+ * EtwStopTraceA [NTDLL.@]
+ *
+ */
+ULONG WINAPI EtwStopTraceA( TRACEHANDLE hSession, LPCSTR SessionName,
PEVENT_TRACE_PROPERTIES Properties )
+{
+ return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_STOP
);
+}
+
+/******************************************************************************
+ * EtwStopTraceW [NTDLL.@]
+ *
+ */
+ULONG WINAPI EtwStopTraceW( TRACEHANDLE hSession, LPCWSTR SessionName,
PEVENT_TRACE_PROPERTIES Properties )
+{
+ return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_STOP
);
+}
+
+/******************************************************************************
+ * EtwUpdateTraceA [NTDLL.@]
+ *
+ */
+ULONG WINAPI EtwUpdateTraceA( TRACEHANDLE hSession, LPCSTR SessionName,
PEVENT_TRACE_PROPERTIES Properties )
+{
+ return EtwControlTraceA( hSession, SessionName, Properties,
EVENT_TRACE_CONTROL_UPDATE );
+}
+
+/******************************************************************************
+ * EtwUpdateTraceW [NTDLL.@]
+ *
+ */
+ULONG WINAPI EtwUpdateTraceW( TRACEHANDLE hSession, LPCWSTR SessionName,
PEVENT_TRACE_PROPERTIES Properties )
+{
+ return EtwControlTraceW( hSession, SessionName, Properties,
EVENT_TRACE_CONTROL_UPDATE );
+}
+
/* EOF */