https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d0f3fa51fb5371b65c2bd…
commit d0f3fa51fb5371b65c2bde39f49caa78089b3ba4
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sat Jan 6 20:48:21 2018 +0100
[ADVAPI32] Stub OpenTrace and ProcessTrace so newer versions of ProcessExplorer start
again.
CORE-10312
---
dll/win32/advapi32/CMakeLists.txt | 1 +
dll/win32/advapi32/advapi32.spec | 6 +++---
dll/win32/advapi32/misc/evntrace.c | 42 ++++++++++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/dll/win32/advapi32/CMakeLists.txt b/dll/win32/advapi32/CMakeLists.txt
index 08b08ca083..196e67ee71 100644
--- a/dll/win32/advapi32/CMakeLists.txt
+++ b/dll/win32/advapi32/CMakeLists.txt
@@ -20,6 +20,7 @@ add_rpc_files(client
list(APPEND SOURCE
misc/dllmain.c
misc/efs.c
+ misc/evntrace.c
misc/hwprofiles.c
misc/logon.c
misc/msi.c
diff --git a/dll/win32/advapi32/advapi32.spec b/dll/win32/advapi32/advapi32.spec
index d4c60be3e8..19193f0d25 100644
--- a/dll/win32/advapi32/advapi32.spec
+++ b/dll/win32/advapi32/advapi32.spec
@@ -432,13 +432,13 @@
432 stdcall OpenServiceA(long str long)
433 stdcall OpenServiceW(long wstr long)
434 stdcall OpenThreadToken(long long long ptr)
-435 stub OpenTraceA
-436 stub OpenTraceW
+435 stdcall -ret64 OpenTraceA(ptr)
+436 stdcall -ret64 OpenTraceW(ptr)
437 stdcall PrivilegeCheck(ptr ptr ptr)
438 stdcall PrivilegedServiceAuditAlarmA(str str long ptr long)
439 stdcall PrivilegedServiceAuditAlarmW(wstr wstr long ptr long)
440 stub ProcessIdleTasks
-441 stub ProcessTrace
+441 stdcall ProcessTrace(ptr long ptr ptr)
442 stdcall QueryAllTracesA(ptr long ptr) ntdll.EtwQueryAllTracesA
443 stdcall QueryAllTracesW(ptr long ptr) ntdll.EtwQueryAllTracesW
444 stdcall QueryRecoveryAgentsOnEncryptedFile(wstr ptr)
diff --git a/dll/win32/advapi32/misc/evntrace.c b/dll/win32/advapi32/misc/evntrace.c
new file mode 100644
index 0000000000..924ce6cb81
--- /dev/null
+++ b/dll/win32/advapi32/misc/evntrace.c
@@ -0,0 +1,42 @@
+/*
+ * PROJECT: ReactOS system libraries
+ * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
+ * PURPOSE: advapi32.dll Event tracing stubs
+ * COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen(a)reactos.org)
+ */
+
+#include <wmistr.h>
+#include <evntrace.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(advapi);
+
+
+TRACEHANDLE
+WINAPI
+OpenTraceA(IN PEVENT_TRACE_LOGFILEA Logfile)
+{
+ UNIMPLEMENTED;
+ SetLastError(ERROR_ACCESS_DENIED);
+ return INVALID_PROCESSTRACE_HANDLE;
+}
+
+TRACEHANDLE
+WINAPI
+OpenTraceW(IN PEVENT_TRACE_LOGFILEW Logfile)
+{
+ UNIMPLEMENTED;
+ SetLastError(ERROR_ACCESS_DENIED);
+ return INVALID_PROCESSTRACE_HANDLE;
+}
+
+ULONG
+WINAPI
+ProcessTrace(IN PTRACEHANDLE HandleArray,
+ IN ULONG HandleCount,
+ IN LPFILETIME StartTime,
+ IN LPFILETIME EndTime)
+{
+ UNIMPLEMENTED;
+ return ERROR_NOACCESS;
+}
+