https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6f232770d3999177188e1c7faed4c66c596f26b4

commit 6f232770d3999177188e1c7faed4c66c596f26b4
Author:     Oleg Dubinskiy <oleg.dubinskij2...@yandex.ua>
AuthorDate: Fri Jan 31 14:01:46 2020 +0200
Commit:     Thomas Faber <thomas.fa...@reactos.org>
CommitDate: Sun Feb 9 08:37:58 2020 +0100

    [NDK][RTL] Implement RtlGetUnloadEventTrace. CORE-16671
---
 dll/ntdll/def/ntdll.spec   |  2 +-
 sdk/include/ndk/rtltypes.h |  2 ++
 sdk/lib/rtl/trace.c        | 10 ++++++++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/dll/ntdll/def/ntdll.spec b/dll/ntdll/def/ntdll.spec
index da5e3614322..00e2ee107ad 100644
--- a/dll/ntdll/def/ntdll.spec
+++ b/dll/ntdll/def/ntdll.spec
@@ -679,7 +679,7 @@
 @ stdcall RtlGetSecurityDescriptorRMControl(ptr ptr)
 @ stdcall RtlGetSetBootStatusData(ptr long long ptr long long)
 @ stdcall RtlGetThreadErrorMode()
-@ stdcall -stub RtlGetUnloadEventTrace()
+@ stdcall RtlGetUnloadEventTrace()
 @ stdcall RtlGetUserInfoHeap(ptr long ptr ptr ptr)
 @ stdcall RtlGetVersion(ptr)
 @ stdcall RtlHashUnicodeString(ptr long long ptr)
diff --git a/sdk/include/ndk/rtltypes.h b/sdk/include/ndk/rtltypes.h
index 02d65a29719..ee3206768e6 100644
--- a/sdk/include/ndk/rtltypes.h
+++ b/sdk/include/ndk/rtltypes.h
@@ -1224,6 +1224,8 @@ typedef struct _RTL_FLS_DATA
 //
 // Unload Event Trace Structure for RtlGetUnloadEventTrace
 //
+#define RTL_UNLOAD_EVENT_TRACE_NUMBER 64
+
 typedef struct _RTL_UNLOAD_EVENT_TRACE
 {
     PVOID BaseAddress;
diff --git a/sdk/lib/rtl/trace.c b/sdk/lib/rtl/trace.c
index 3979a502855..f0bf4578a01 100644
--- a/sdk/lib/rtl/trace.c
+++ b/sdk/lib/rtl/trace.c
@@ -10,8 +10,18 @@
 #define NDEBUG
 #include <debug.h>
 
+static RTL_UNLOAD_EVENT_TRACE 
RtlpUnloadEventTrace[RTL_UNLOAD_EVENT_TRACE_NUMBER];
+
 /* FUNCTIONS 
******************************************************************/
 
+PRTL_UNLOAD_EVENT_TRACE
+NTAPI
+RtlGetUnloadEventTrace(VOID)
+{
+    /* Just return a pointer to an array, according to MSDN */
+    return RtlpUnloadEventTrace;
+}
+
 BOOLEAN
 NTAPI
 RtlTraceDatabaseAdd(IN PRTL_TRACE_DATABASE Database, 

Reply via email to