RtlIsGenericTableEmptyAvl 函数 (ntddk.h)
RtlIsGenericTableEmptyAvl 例程确定泛型表是否为空。
语法
NTSYSAPI BOOLEAN RtlIsGenericTableEmptyAvl(
[in] PRTL_AVL_TABLE Table
);
参数
[in] Table
指向泛型表(RTL_GENERIC_TABLE)的指针。 必须通过调用 RtlIsGenericTableEmptyAvl来初始化表。
返回值
如果表包含一个或多个元素,则 RtlIsGenericTableEmptyAvl 返回 FALSE,否则 TRUE。
言论
默认情况下,作系统使用 splay 树来实现泛型表,但 RtlIsGenericTableEmptyAvl 例程仅适用于 Adelson-Velsky/Landis (AVL) 树。 若要将泛型表例程配置为使用 AVL 树而不是驱动程序中的 splay 树,请在公共头文件中插入以下 define 语句,然后再包括 Ntddk.h:
#define RTL_USE_AVL_TABLES 0
如果未定义RTL_USE_AVL_TABLES,则必须使用泛型表例程的 AVL 形式。 例如,使用 RtlIsGenericTableEmptyAvl 例程,而不是 RtlIsGenericTableEmpty。 在调用 RtlIsGenericTableEmptyAvl时,调用方必须传递 RTL_AVL_TABLE 表结构,而不是 RTL_GENERIC_TABLE。
RtlIsGenericTableEmptyAvl 的调用方必须在≤ APC_LEVEL运行(如果调用方分配的内存在 表 可分页)。
要求
要求 | 价值 |
---|---|
最低支持的客户端 | 从 Windows XP 开始可用。 |
目标平台 | 普遍 |
标头 | ntddk.h (包括 Ntddk.h、 Ntifs.h) |
库 | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | <= APC_LEVEL (请参阅“备注”部分) |