RemoveEntryList routine

The RemoveEntryList routine removes an entry from a doubly linked list of LIST_ENTRY structures.


BOOLEAN RemoveEntryList(
  _In_ PLIST_ENTRY Entry


Entry [in]

Pointer to the LIST_ENTRY structure that represents the entry to be removed.

Return value

RemoveEntryList returns TRUE if, after removal of the designated entry, the list is empty. Otherwise, the routine returns FALSE to indicate that the resulting list still contains one or more entries. For information, see Remarks.

Note  Before Microsoft Windows Server 2003, RemoveEntryList was defined to return VOID, not BOOLEAN.


RemoveEntryList removes the entry by setting the Flink member of the entry before Entry to point to the entry after Entry, and the Blink member of the entry after Entry to point to the entry before Entry.

The return value can be used to detect when the last entry is removed from the list. An empty list consists of a list head only and no list entries.

Note  Typically, Entry points to an entry in a list and not to the list head. However, Entry can point to a list head, in which case the routine removes the list head from the list to produce a headless list. When RemoveEntryList is used in this way, the return value should typically be ignored. To determine whether a list is empty, use the IsListEmpty routine.

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

In Windows XP and Windows 2000, RemoveEntryList did not return a value. Starting with Windows Server 2003, RemoveEntryList returns a BOOLEAN value.

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


Target platform



Available starting with Windows 2000.


Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)


Any level (See Remarks section)

DDI compliance rules


See also




Send comments about this topic to Microsoft