From: Vijay Kiran Kamuju Subject: [PATCH 1/4] ntdll: Implement RtlInitializeGenericTable Message-Id: Date: Thu, 29 Oct 2020 14:43:42 +0100 Signed-off-by: Vijay Kiran Kamuju From 453e8fc31358829643385caed63bd8ba6dd602ba Mon Sep 17 00:00:00 2001 From: Vijay Kiran Kamuju Date: Thu, 29 Oct 2020 14:03:50 +0100 Subject: [PATCH 1/4] ntdll: Implement RtlInitializeGenericTable Signed-off-by: Vijay Kiran Kamuju --- 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 ca4fea84209..925bd42a7d5 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -406,7 +406,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.29.1