#ifndef _NTRTL_H
_Check_return_
NTSYSAPI
BOOLEAN
NTAPI
RtlIsGenericTableEmpty(
_In_ PRTL_GENERIC_TABLE Table
);
View code on GitHub// ntddk.h
NTSYSAPI BOOLEAN RtlIsGenericTableEmpty(
[in] PRTL_GENERIC_TABLE Table
);
View the official Windows Driver Kit DDI referenceThis function is documented in Windows Driver Kit.
The RtlIsGenericTableEmpty routine determines if a generic table is empty.
Table [in]Pointer to the generic table (RTL_GENERIC_TABLE). The table must have been initialized by calling RtlInitializeGenericTable.
RtlIsGenericTableEmpty returns FALSE if the table contains one or more elements, TRUE otherwise.
By default, the operating system uses splay trees to implement generic tables. Under some circumstances, operations on a splay tree will make the tree deep and narrow and might even turn it into a straight line. Very deep trees degrade the performance of searches. You can ensure a more balanced, shallower tree implementation of generic tables by using Adelson-Velsky/Landis (AVL) trees. If you want to configure the generic table routines to use AVL trees instead of splay trees in your driver, insert the following define statement in a common header file before including Ntddk.h:
#define RTL_USE_AVL_TABLES 0
If RTL_USE_AVL_TABLES is not defined, you must use the AVL form of the generic table routines. For example, use the RtlIsGenericTableEmptyAvl Structure routine instead of RtlIsGenericTableEmpty. In the call to RtlIsGenericTableEmptyAvl, the caller must pass a RTL_AVL_TABLE table structure rather than RTL_GENERIC_TABLE.
Callers of RtlIsGenericTableEmpty must be running at ≤ APC_LEVEL if the caller-allocated memory at Table is pageable.