From 82a4f2e0ecd55090836e95feeb7cc75c20e6f833 Mon Sep 17 00:00:00 2001 From: Vijay Kiran Kamuju Date: Tue, 30 Nov 2021 20:15:55 -0700 Subject: [PATCH] ntdll: Implement RtlInitializeGenericTable. Signed-off-by: Vijay Kiran Kamuju Signed-off-by: Alex Henrie Signed-off-by: Alexandre Julliard --- 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 1e359e4a043..f77e4058378 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -429,7 +429,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*);