[PATCH resend 1/4] ntdll: Implement RtlInitializeGenericTable

Alex Henrie alexhenrie24 at gmail.com
Thu Jan 14 18:47:30 CST 2021


From: Vijay Kiran Kamuju <infyquest at gmail.com>

Signed-off-by: Vijay Kiran Kamuju <infyquest at gmail.com>
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 dlls/ntdll/rtl.c    | 13 ++++++++++++-
 include/ddk/ntddk.h |  1 +
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index cf21c980a45..6afe4d876dd 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -428,7 +428,18 @@ void WINAPI RtlInitializeGenericTable(RTL_GENERIC_TABLE *table, PRTL_GENERIC_COM
                                       PRTL_GENERIC_ALLOCATE_ROUTINE allocate, PRTL_GENERIC_FREE_ROUTINE free,
                                       void *context)
 {
-    FIXME("(%p, %p, %p, %p, %p) stub!\n", table, compare, allocate, free, context);
+    TRACE("(%p, %p, %p, %p, %p)\n", table, compare, allocate, free, context);
+
+    table->TableRoot = NULL;
+    table->InsertOrderList.Flink = &(table->InsertOrderList);
+    table->InsertOrderList.Blink = &(table->InsertOrderList);
+    table->OrderedPointer = &(table->InsertOrderList);
+    table->NumberGenericTableElements = 0;
+    table->WhichOrderedElement = 0;
+    table->CompareRoutine = compare;
+    table->AllocateRoutine = allocate;
+    table->FreeRoutine = free;
+    table->TableContext = context;
 }
 
 /******************************************************************************
diff --git a/include/ddk/ntddk.h b/include/ddk/ntddk.h
index 41ad3d721bd..3a1d68b1fa8 100644
--- a/include/ddk/ntddk.h
+++ b/include/ddk/ntddk.h
@@ -265,6 +265,7 @@ NTSTATUS  WINAPI PsSetCreateProcessNotifyRoutine(PCREATE_PROCESS_NOTIFY_ROUTINE,
 NTSTATUS  WINAPI PsSetCreateProcessNotifyRoutineEx(PCREATE_PROCESS_NOTIFY_ROUTINE_EX,BOOLEAN);
 NTSTATUS  WINAPI PsSetCreateThreadNotifyRoutine(PCREATE_THREAD_NOTIFY_ROUTINE);
 NTSTATUS  WINAPI PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE);
+void      WINAPI RtlInitializeGenericTable(PRTL_GENERIC_TABLE,PRTL_GENERIC_COMPARE_ROUTINE,PRTL_GENERIC_ALLOCATE_ROUTINE,PRTL_GENERIC_FREE_ROUTINE,void *);
 void      WINAPI RtlInitializeGenericTableAvl(PRTL_AVL_TABLE,PRTL_AVL_COMPARE_ROUTINE,PRTL_AVL_ALLOCATE_ROUTINE, PRTL_AVL_FREE_ROUTINE,void *);
 void      WINAPI RtlInsertElementGenericTableAvl(PRTL_AVL_TABLE,void *,ULONG,BOOL*);
 
-- 
2.30.0




More information about the wine-devel mailing list