#ifndef _NTRTL_H
typedef struct _RTL_AVL_TABLE
{
RTL_BALANCED_LINKS BalancedRoot;
PVOID OrderedPointer;
ULONG WhichOrderedElement;
ULONG NumberGenericTableElements;
ULONG DepthOfTree;
PRTL_BALANCED_LINKS RestartKey;
ULONG DeleteCount;
PRTL_AVL_COMPARE_ROUTINE CompareRoutine;
PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine;
PRTL_AVL_FREE_ROUTINE FreeRoutine;
PVOID TableContext;
} RTL_AVL_TABLE, *PRTL_AVL_TABLE;
View code on GitHub// ntddk.h
typedef struct _RTL_AVL_TABLE {
RTL_BALANCED_LINKS BalancedRoot;
PVOID OrderedPointer;
ULONG WhichOrderedElement;
ULONG NumberGenericTableElements;
ULONG DepthOfTree;
PRTL_BALANCED_LINKS RestartKey;
ULONG DeleteCount;
PRTL_AVL_COMPARE_ROUTINE CompareRoutine;
PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine;
PRTL_AVL_FREE_ROUTINE FreeRoutine;
PVOID TableContext;
} RTL_AVL_TABLE;
View the official Windows Driver Kit DDI referenceThis structure is documented in Windows Driver Kit.
The RTL_AVL_TABLE structure contains file system-specific data for an Adelson-Velsky/Landis (AVL) tree. An AVL tree ensures a more balanced, shallower tree implementation than a splay tree implementation of a generic table (RTL_GENERIC_TABLE).
RTL_AVL_TABLE is opaque, so cannot be directly manipulated. Drivers must use the support routines that are described in the Remarks section to manipulate RTL_AVL_TABLE values.
BalancedRootReserved for system use.
OrderedPointerReserved for system use.
WhichOrderedElementReserved for system use.
NumberGenericTableElementsReserved for system use.
DepthOfTreeReserved for system use.
RestartKeyReserved for system use.
DeleteCountReserved for system use.
CompareRoutineReserved for system use.
AllocateRoutineReserved for system use.
FreeRoutineReserved for system use.
TableContextReserved for system use.
To initialize an AVL table package, you allocate a buffer that is at least sizeof(RTL_AVL_TABLE) bytes in size. You can then use this buffer to receive the initialized AVL table structure from a call to the RtlInitializeGenericTableAvl routine. Use the following routines to manipulate the table:
RtlDeleteElementGenericTableAvl
RtlEnumerateGenericTableLikeADirectory
RtlEnumerateGenericTableWithoutSplayingAvl
RtlInsertElementGenericTableAvl
RtlInsertElementGenericTableFullAvl
RtlLookupElementGenericTableAvl
RtlLookupElementGenericTableFullAvl
RtlLookupFirstMatchingElementGenericTableAvl
RtlNumberGenericTableElementsAvl