RtlCheckListEntry - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

// #ifndef NO_LIST_ENTRY_CHECKS
// #define NO_LIST_ENTRY_CHECKS
// #endif

/**
 * The RtlCheckListEntry routine checks the integrity of a doubly linked list entry.
 *
 * \param Entry A pointer to the list entry to check.
 * \remarks This function calls `RtlFatalListEntryError` if the list entry is corrupted.
 */
FORCEINLINE
VOID
NTAPI_INLINE
RtlCheckListEntry(
    _In_ PLIST_ENTRY Entry
    )
{
    if ((((Entry->Flink)->Blink) != Entry) || (((Entry->Blink)->Flink) != Entry))
    {
        RtlFatalListEntryError(
            (PVOID)(Entry),
            (PVOID)((Entry->Flink)->Blink),
            (PVOID)((Entry->Blink)->Flink)
            );
    }
}

#endif

View code on GitHub

NtDoc

No description available.