IsListEmpty function (wdm.h)

The IsListEmpty routine indicates whether a doubly linked list of LIST_ENTRY structures is empty.

Syntax

BOOLEAN IsListEmpty(
  [in] const LIST_ENTRY *ListHead
);

Parameters

[in] ListHead

Pointer to a LIST_ENTRY structure that represents the head of the list.

Return value

IsListEmpty returns TRUE if there are currently no entries in the list and FALSE otherwise.

Remarks

IsListEmpty returns TRUE if ListHead->Flink refers back to ListHead.

For information about using this routine when implementing a doubly linked list, see Singly and Doubly Linked Lists.

Callers of IsListEmpty can be running at any IRQL. If IsListEmpty is called at IRQL >= DISPATCH_LEVEL, the storage for ListHead must be resident.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Desktop
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h, Wudfwdm.h)
IRQL Any level (see Remarks section)

See also

InitializeListHead

RemoveEntryList

RemoveHeadList

RemoveTailList