ReactOS  r75907
rtlfuncs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FAST_FAIL_LEGACY_GS_VIOLATION   0
 
#define FAST_FAIL_VTGUARD_CHECK_FAILURE   1
 
#define FAST_FAIL_STACK_COOKIE_CHECK_FAILURE   2
 
#define FAST_FAIL_CORRUPT_LIST_ENTRY   3
 
#define FAST_FAIL_INCORRECT_STACK   4
 
#define FAST_FAIL_INVALID_ARG   5
 
#define FAST_FAIL_GS_COOKIE_INIT   6
 
#define FAST_FAIL_FATAL_APP_EXIT   7
 
#define FAST_FAIL_RANGE_CHECK_FAILURE   8
 
#define FAST_FAIL_UNSAFE_REGISTRY_ACCESS   9
 
#define FAST_FAIL_GUARD_ICALL_CHECK_FAILURE   10
 
#define FAST_FAIL_GUARD_WRITE_CHECK_FAILURE   11
 
#define FAST_FAIL_INVALID_FIBER_SWITCH   12
 
#define FAST_FAIL_INVALID_SET_OF_CONTEXT   13
 
#define FAST_FAIL_INVALID_REFERENCE_COUNT   14
 
#define FAST_FAIL_INVALID_JUMP_BUFFER   18
 
#define FAST_FAIL_MRDATA_MODIFIED   19
 
#define FAST_FAIL_INVALID_FAST_FAIL_CODE   0xFFFFFFFF
 
#define RTL_STATIC_LIST_HEAD(x)   LIST_ENTRY x = { &x, &x }
 
#define RtlCopyMemory(Destination, Source, Length)   memcpy(Destination, Source, Length)
 
#define RtlCopyBytes   RtlCopyMemory
 
#define RtlCopyMemoryNonTemporal   RtlCopyMemory
 
#define RtlEqualLuid(Luid1, Luid2)   (((Luid1)->LowPart == (Luid2)->LowPart) && ((Luid1)->HighPart == (Luid2)->HighPart))
 
#define RtlEqualMemory(Destination, Source, Length)   (!memcmp(Destination, Source, Length))
 
#define RtlFillMemory(Destination, Length, Fill)   memset(Destination, Fill, Length)
 
#define RtlFillBytes   RtlFillMemory
 
#define RtlMoveMemory(Destination, Source, Length)   memmove(Destination, Source, Length)
 
#define RtlZeroMemory(Destination, Length)   memset(Destination, 0, Length)
 
#define RtlZeroBytes   RtlZeroMemory
 
#define RtlAnsiStringToUnicodeSize(String)
 
#define RtlIntPtrToUnicodeString(Value, Base, String)   RtlIntegerToUnicodeString(Value, Base, String)
 
#define RtlIsZeroLuid(_L1)   ((BOOLEAN) ((!(_L1)->LowPart) && (!(_L1)->HighPart)))
 
#define SHORT_SIZE   (sizeof(USHORT))
 
#define SHORT_MASK   (SHORT_SIZE - 1)
 
#define LONG_SIZE   (sizeof(LONG))
 
#define LONGLONG_SIZE   (sizeof(LONGLONG))
 
#define LONG_MASK   (LONG_SIZE - 1)
 
#define LONGLONG_MASK   (LONGLONG_SIZE - 1)
 
#define LOWBYTE_MASK   0x00FF
 
#define FIRSTBYTE(VALUE)   ((VALUE) & LOWBYTE_MASK)
 
#define SECONDBYTE(VALUE)   (((VALUE) >> 8) & LOWBYTE_MASK)
 
#define THIRDBYTE(VALUE)   (((VALUE) >> 16) & LOWBYTE_MASK)
 
#define FOURTHBYTE(VALUE)   (((VALUE) >> 24) & LOWBYTE_MASK)
 
#define RtlStoreUlong(Address, Value)
 
#define RtlStoreUlonglong(Address, Value)
 
#define RtlStoreUshort(Address, Value)
 
#define RtlRetrieveUshort(DestAddress, SrcAddress)
 
#define RtlRetrieveUlong(DestAddress, SrcAddress)
 
#define RtlStoreUlongPtr(Address, Value)   RtlStoreUlong(Address,Value)
 
#define RtlUnicodeStringToAnsiSize(String)
 
#define RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT   8
 
#define RtlLargeIntegerAnd(Result, Source, Mask)   Result.QuadPart = Source.QuadPart & Mask.QuadPart
 
#define RtlLargeIntegerEqualTo(X, Y)   (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
 
#define RtlCheckBit(BMH, BP)   (((((PLONG)(BMH)->Buffer)[(BP)/32]) >> ((BP)%32)) & 0x1)
 
#define RtlLargeIntegerGreaterThan(X, Y)
 
#define RtlLargeIntegerGreaterThanOrEqualTo(X, Y)
 
#define RtlLargeIntegerNotEqualTo(X, Y)
 
#define RtlLargeIntegerLessThan(X, Y)
 
#define RtlLargeIntegerLessThanOrEqualTo(X, Y)
 
#define RtlLargeIntegerGreaterThanZero(X)
 
#define RtlLargeIntegerGreaterOrEqualToZero(X)   ( (X).HighPart >= 0 )
 
#define RtlLargeIntegerEqualToZero(X)   ( !((X).LowPart | (X).HighPart) )
 
#define RtlLargeIntegerNotEqualToZero(X)   ( ((X).LowPart | (X).HighPart) )
 
#define RtlLargeIntegerLessThanZero(X)   ( ((X).HighPart < 0) )
 
#define RtlLargeIntegerLessOrEqualToZero(X)   ( ((X).HighPart < 0) || !((X).LowPart | (X).HighPart) )
 
#define RtlUshortByteSwap(_x)   _byteswap_ushort((USHORT)(_x))
 
#define RtlUlongByteSwap(_x)   _byteswap_ulong((_x))
 
#define RtlUlonglongByteSwap(_x)   _byteswap_uint64((_x))
 
#define __assert_annotationA(msg)   DbgPrint("Assertion failed at %s(%d): %s\n", __FILE__, __LINE__, msg)
 
#define __assert_annotationW(msg)   DbgPrint("Assertion failed at %s(%d): %S\n", __FILE__, __LINE__, msg)
 
#define NT_ANALYSIS_ASSUME(_exp)   __noop(_exp)
 
#define NT_ASSERT_ACTION(exp)
 
#define NT_ASSERTMSG_ACTION(msg, exp)
 
#define NT_ASSERTMSGW_ACTION(msg, exp)
 
#define ASSERT(exp)   ((void)0)
 
#define ASSERTMSG(msg, exp)   ((void)0)
 
#define RTL_SOFT_ASSERT(exp)   ((void)0)
 
#define RTL_SOFT_ASSERTMSG(msg, exp)   ((void)0)
 
#define RTL_VERIFY(exp)   ((exp) ? TRUE : FALSE)
 
#define RTL_VERIFYMSG(msg, exp)   ((exp) ? TRUE : FALSE)
 
#define RTL_SOFT_VERIFY(exp)   ((exp) ? TRUE : FALSE)
 
#define RTL_SOFT_VERIFYMSG(msg, exp)   ((exp) ? TRUE : FALSE)
 
#define NT_VERIFY(exp)   (NT_ANALYSIS_ASSUME(exp), ((exp) ? TRUE : FALSE))
 
#define NT_VERIFYMSG(msg, exp)   (NT_ANALYSIS_ASSUME(exp), ((exp) ? TRUE : FALSE))
 
#define NT_VERIFYMSGW(msg, exp)   (NT_ANALYSIS_ASSUME(exp), ((exp) ? TRUE : FALSE))
 
#define NT_ASSERT_ASSUME(exp)   (NT_ANALYSIS_ASSUME(exp), (void)0)
 
#define NT_ASSERTMSG_ASSUME(msg, exp)   (NT_ANALYSIS_ASSUME(exp), (void)0)
 
#define NT_ASSERTMSGW_ASSUME(msg, exp)   (NT_ANALYSIS_ASSUME(exp), (void)0)
 
#define NT_ASSERT_NOASSUME(exp)   ((void)0)
 
#define NT_ASSERTMSG_NOASSUME(msg, exp)   ((void)0)
 
#define NT_ASSERTMSGW_NOASSUME(msg, exp)   ((void)0)
 
#define NT_FRE_ASSERT   (void)NT_ASSERT_ACTION
 
#define NT_FRE_ASSERTMSG   (void)NT_ASSERTMSG_ACTION
 
#define NT_FRE_ASSERTMSGW   (void)NT_ASSERTMSGW_ACTION
 
#define NT_ASSERT   NT_ASSERT_NOASSUME
 
#define NT_ASSERTMSG   NT_ASSERTMSG_NOASSUME
 
#define NT_ASSERTMSGW   NT_ASSERTMSGW_NOASSUME
 
#define InitializeListHead32(ListHead)
 
#define InterlockedPushEntrySList(SListHead, SListEntry)   ExpInterlockedPushEntrySList(SListHead, SListEntry)
 
#define InterlockedPopEntrySList(SListHead)   ExpInterlockedPopEntrySList(SListHead)
 
#define InterlockedFlushSList(SListHead)   ExpInterlockedFlushSList(SListHead)
 
#define QueryDepthSList(SListHead)   ExQueryDepthSList(SListHead)
 
#define RTL_CONTEXT_EX_OFFSET(ContextEx, Chunk)   ((ContextEx)->Chunk.Offset)
 
#define RTL_CONTEXT_EX_LENGTH(ContextEx, Chunk)   ((ContextEx)->Chunk.Length)
 
#define RTL_CONTEXT_EX_CHUNK(Base, Layout, Chunk)   ((PVOID)((PCHAR)(Base) + RTL_CONTEXT_EX_OFFSET(Layout, Chunk)))
 
#define RTL_CONTEXT_OFFSET(Context, Chunk)   RTL_CONTEXT_EX_OFFSET((PCONTEXT_EX)(Context + 1), Chunk)
 
#define RTL_CONTEXT_LENGTH(Context, Chunk)   RTL_CONTEXT_EX_LENGTH((PCONTEXT_EX)(Context + 1), Chunk)
 
#define RTL_CONTEXT_CHUNK(Context, Chunk)
 
#define RtlIsNtDdiVersionAvailable   WdmlibRtlIsNtDdiVersionAvailable
 
#define RtlIsServicePackVersionInstalled   WdmlibRtlIsServicePackVersionInstalled
 
#define RtlInterlockedSetBits(Flags, Flag)   InterlockedOr((PLONG)(Flags), Flag)
 
#define RtlInterlockedAndBits(Flags, Flag)   InterlockedAnd((PLONG)(Flags), Flag)
 
#define RtlInterlockedClearBits(Flags, Flag)   RtlInterlockedAndBits(Flags, ~(Flag))
 
#define RtlInterlockedXorBits(Flags, Flag)   InterlockedXor(Flags, Flag)
 
#define RtlInterlockedSetBitsDiscardReturn(Flags, Flag)   (VOID) RtlInterlockedSetBits(Flags, Flag)
 
#define RtlInterlockedAndBitsDiscardReturn(Flags, Flag)   (VOID) RtlInterlockedAndBits(Flags, Flag)
 
#define RtlInterlockedClearBitsDiscardReturn(Flags, Flag)   RtlInterlockedAndBitsDiscardReturn(Flags, ~(Flag))
 
#define RtlInitializeSplayLinks(Links)
 
#define RtlIsLeftChild(Links)   (RtlLeftChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
 
#define RtlIsRightChild(Links)   (RtlRightChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
 
#define RtlRightChild(Links)   ((PRTL_SPLAY_LINKS)(Links))->RightChild
 
#define RtlIsRoot(Links)   (RtlParent(Links) == (PRTL_SPLAY_LINKS)(Links))
 
#define RtlLeftChild(Links)   ((PRTL_SPLAY_LINKS)(Links))->LeftChild
 
#define RtlParent(Links)   ((PRTL_SPLAY_LINKS)(Links))->Parent
 
#define RtlInsertAsLeftChild(ParentLinks, ChildLinks)
 
#define RtlInsertAsRightChild(ParentLinks, ChildLinks)
 
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE   1
 
#define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING   2
 
#define RtlUnicodeStringToOemSize(STRING)
 
#define RtlOemStringToUnicodeSize(STRING)
 
#define RtlOemStringToCountedUnicodeSize(STRING)
 
#define RtlOffsetToPointer(B, O)   ((PCHAR)(((PCHAR)(B)) + ((ULONG_PTR)(O))))
 
#define RtlPointerToOffset(B, P)   ((ULONG)(((PCHAR)(P)) - ((PCHAR)(B))))
 

Functions

 $if (_WDMDDK_) DECLSPEC_NORETURN FORCEINLINE VOID RtlFailFast(_In_ ULONG Code)
 
FORCEINLINE VOID InitializeListHead (_Out_ PLIST_ENTRY ListHead)
 
_Must_inspect_result_
FORCEINLINE BOOLEAN 
IsListEmpty (_In_ const LIST_ENTRY *ListHead)
 
FORCEINLINE BOOLEAN RemoveEntryListUnsafe (_In_ PLIST_ENTRY Entry)
 
FORCEINLINE VOID FatalListEntryError (_In_ PVOID P1, _In_ PVOID P2, _In_ PVOID P3)
 
FORCEINLINE VOID RtlpCheckListEntry (_In_ PLIST_ENTRY Entry)
 
FORCEINLINE BOOLEAN RemoveEntryList (_In_ PLIST_ENTRY Entry)
 
FORCEINLINE PLIST_ENTRY RemoveHeadList (_Inout_ PLIST_ENTRY ListHead)
 
FORCEINLINE PLIST_ENTRY RemoveTailList (_Inout_ PLIST_ENTRY ListHead)
 
FORCEINLINE VOID InsertTailList (_Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY Entry)
 
FORCEINLINE VOID InsertHeadList (_Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY Entry)
 
FORCEINLINE VOID AppendTailList (_Inout_ PLIST_ENTRY ListHead, _Inout_ PLIST_ENTRY ListToAppend)
 
FORCEINLINE PSINGLE_LIST_ENTRY PopEntryList (_Inout_ PSINGLE_LIST_ENTRY ListHead)
 
FORCEINLINE VOID PushEntryList (_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY Entry)
 
__analysis_noreturn NTSYSAPI
VOID NTAPI 
RtlAssert (_In_ PVOID FailedAssertion, _In_ PVOID FileName, _In_ ULONG LineNumber, _In_opt_z_ PSTR Message)
 
 _IRQL_requires_max_ (PASSIVE_LEVEL) NTSYSAPI VOID NTAPI RtlFreeUnicodeString(_Inout_ _At_(UnicodeString-> Buffer, __drv_freesMem(Mem)) PUNICODE_STRING UnicodeString)
 
 _IRQL_requires_max_ (DISPATCH_LEVEL) _At_(DestinationString-> Buffer, _Post_equal_to_(SourceString)) _When_(SourceString!=NULL, _At_(DestinationString->Length, _Post_equal_to_(_String_length_(SourceString)*sizeof(WCHAR))) _At_(DestinationString->MaximumLength, _Post_equal_to_(DestinationString->Length+sizeof(WCHAR)))) _When_(SourceString==NULL, _At_(DestinationString->Length, _Post_equal_to_(0)) _At_(DestinationString->MaximumLength, _Post_equal_to_(0))) NTSYSAPI VOID NTAPI RtlInitUnicodeString(_Out_ PUNICODE_STRING DestinationString, _In_opt_z_ __drv_aliasesMem PCWSTR SourceString)
 
_Out_ _At_ (GuidString->Buffer, __drv_allocatesMem(Mem)) PUNICODE_STRING GuidString)
 
 $endif (_WDMDDK_) $if(_WDMDDK_) _Must_inspect_result_ NTSYSAPI BOOLEAN NTAPI RtlAreBitsClear(_In_ PRTL_BITMAP BitMapHeader
 
_Must_inspect_result_ NTSYSAPI
BOOLEAN NTAPI 
RtlAreBitsSet (_In_ PRTL_BITMAP BitMapHeader, _In_ ULONG StartingIndex, _In_ ULONG Length)
 
_Out_ _At_ (DestinationString->Buffer, __drv_allocatesMem(Mem))) _When_(!AllocateDestinationString
 
 _Success_ (1) _Unchanged_(Destination-> MaximumLength) _Unchanged_(Destination->Buffer) _When_(_Old_(Destination->Length)+Source->Length<=Destination->MaximumLength, _At_(Destination->Length, _Post_equal_to_(_Old_(Destination->Length)+Source->Length)) _At_(return, _Out_range_(==, 0))) _When_(_Old_(Destination->Length)+Source->Length > Destination->MaximumLength, _Unchanged_(Destination->Length) _At_(return, _Out_range_(<, 0))) NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(_Inout_ PUNICODE_STRING Destination, _In_ PCUNICODE_STRING Source)
 
NTSYSAPI VOID NTAPI RtlClearAllBits (_In_ PRTL_BITMAP BitMapHeader)
 
NTSYSAPI VOID NTAPI RtlClearBits (_In_ PRTL_BITMAP BitMapHeader, _In_range_(0, BitMapHeader->SizeOfBitMap-NumberToClear) ULONG StartingIndex, _In_range_(0, BitMapHeader->SizeOfBitMap-StartingIndex) ULONG NumberToClear)
 
_Must_inspect_result_ NTSYSAPI
SIZE_T NTAPI 
RtlCompareMemory (_In_ const VOID *Source1, _In_ const VOID *Source2, _In_ SIZE_T Length)
 
_In_ SIZE_T _In_reads_ (String2Length) PCWCH String2
 
 _Unchanged_ (DestinationString->Buffer) _Unchanged_(DestinationString-> MaximumLength) _At_(DestinationString->Length, _When_(SourceString->Length > DestinationString->MaximumLength, _Post_equal_to_(DestinationString->MaximumLength)) _When_(SourceString->Length<=DestinationString->MaximumLength, _Post_equal_to_(SourceString->Length))) NTSYSAPI VOID NTAPI RtlCopyUnicodeString(_Inout_ PUNICODE_STRING DestinationString, _In_opt_ PCUNICODE_STRING SourceString)
 
 _IRQL_requires_max_ (APC_LEVEL) NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor
 
NTSYSAPI LARGE_INTEGER NTAPI RtlExtendedIntegerMultiply (_In_ LARGE_INTEGER Multiplicand, _In_ LONG Multiplier)
 
NTSYSAPI LARGE_INTEGER NTAPI RtlExtendedLargeIntegerDivide (_In_ LARGE_INTEGER Dividend, _In_ ULONG Divisor, _Out_opt_ PULONG Remainder)
 
 _Success_ (return!=-1) _Must_inspect_result_ NTSYSAPI ULONG NTAPI RtlFindClearBits(_In_ PRTL_BITMAP BitMapHeader
 
NTSYSAPI ULONG NTAPI RtlFindFirstRunClear (_In_ PRTL_BITMAP BitMapHeader, _Out_ PULONG StartingIndex)
 
NTSYSAPI ULONG NTAPI RtlFindClearRuns (_In_ PRTL_BITMAP BitMapHeader, _Out_writes_to_(SizeOfRunArray, return) PRTL_BITMAP_RUN RunArray, _In_range_(>, 0) ULONG SizeOfRunArray, _In_ BOOLEAN LocateLongestRuns)
 
NTSYSAPI ULONG NTAPI RtlFindLastBackwardRunClear (_In_ PRTL_BITMAP BitMapHeader, _In_ ULONG FromIndex, _Out_ PULONG StartingRunIndex)
 
NTSYSAPI ULONG NTAPI RtlFindLongestRunClear (_In_ PRTL_BITMAP BitMapHeader, _Out_ PULONG StartingIndex)
 
NTSYSAPI ULONG NTAPI RtlFindNextForwardRunClear (_In_ PRTL_BITMAP BitMapHeader, _In_ ULONG FromIndex, _Out_ PULONG StartingRunIndex)
 
 _At_ (BitMapHeader->SizeOfBitMap, _Post_equal_to_(SizeOfBitMap)) _At_(BitMapHeader-> Buffer, _Post_equal_to_(BitMapBuffer)) NTSYSAPI VOID NTAPI RtlInitializeBitMap(_Out_ PRTL_BITMAP BitMapHeader, _In_opt_ __drv_aliasesMem PULONG BitMapBuffer, _In_opt_ ULONG SizeOfBitMap)
 
NTSYSAPI ULONG NTAPI RtlNumberOfClearBits (_In_ PRTL_BITMAP BitMapHeader)
 
NTSYSAPI ULONG NTAPI RtlNumberOfSetBits (_In_ PRTL_BITMAP BitMapHeader)
 
NTSYSAPI VOID NTAPI RtlSetAllBits (_In_ PRTL_BITMAP BitMapHeader)
 
NTSYSAPI VOID NTAPI RtlSetBits (_In_ PRTL_BITMAP BitMapHeader, _In_range_(0, BitMapHeader->SizeOfBitMap-NumberToSet) ULONG StartingIndex, _In_range_(0, BitMapHeader->SizeOfBitMap-StartingIndex) ULONG NumberToSet)
 
NTSYSAPI VOID NTAPI RtlTimeToTimeFields (_In_ PLARGE_INTEGER Time, _Out_ PTIME_FIELDS TimeFields)
 
NTSYSAPI USHORT FASTCALL RtlUshortByteSwap (_In_ USHORT Source)
 
NTSYSAPI ULONG FASTCALL RtlUlongByteSwap (_In_ ULONG Source)
 
NTSYSAPI ULONGLONG FASTCALL RtlUlonglongByteSwap (_In_ ULONGLONG Source)
 
 _When_ (AllocateDestinationString, _At_(DestinationString->MaximumLength, _Out_range_(<=,(SourceString->MaximumLength/sizeof(WCHAR))))) _When_(!AllocateDestinationString
 
 _At_ (DestinationString->Buffer, _Const_) _At_(DestinationString-> MaximumLength, _Const_)) _IRQL_requires_max_(PASSIVE_LEVEL) _When_(AllocateDestinationString, _Must_inspect_result_) NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(_When_(AllocateDestinationString, _Out_ _At_(DestinationString->Buffer, __drv_allocatesMem(Mem))) _When_(!AllocateDestinationString, _Inout_) PANSI_STRING DestinationString, _In_ PCUNICODE_STRING SourceString, _In_ BOOLEAN AllocateDestinationString)
 
_In_ PCWSTR _In_z_ PCWSTR _In_
ULONG 
_In_reads_bytes_opt_ (ValueLength) PVOID ValueData
 
NTSYSAPI PVOID NTAPI RtlInsertElementGenericTable (_In_ PRTL_GENERIC_TABLE Table, _In_reads_bytes_(BufferSize) PVOID Buffer, _In_ CLONG BufferSize, _Out_opt_ PBOOLEAN NewElement)
 
NTSYSAPI PVOID NTAPI RtlInsertElementGenericTableFull (_In_ PRTL_GENERIC_TABLE Table, _In_reads_bytes_(BufferSize) PVOID Buffer, _In_ CLONG BufferSize, _Out_opt_ PBOOLEAN NewElement, _In_ PVOID NodeOrParent, _In_ TABLE_SEARCH_RESULT SearchResult)
 
NTSYSAPI BOOLEAN NTAPI RtlDeleteElementGenericTable (_In_ PRTL_GENERIC_TABLE Table, _In_ PVOID Buffer)
 
_Must_inspect_result_ NTSYSAPI
PVOID NTAPI 
RtlLookupElementGenericTable (_In_ PRTL_GENERIC_TABLE Table, _In_ PVOID Buffer)
 
NTSYSAPI PVOID NTAPI RtlLookupElementGenericTableFull (_In_ PRTL_GENERIC_TABLE Table, _In_ PVOID Buffer, _Out_ PVOID *NodeOrParent, _Out_ TABLE_SEARCH_RESULT *SearchResult)
 
_Must_inspect_result_ NTSYSAPI
PVOID NTAPI 
RtlEnumerateGenericTable (_In_ PRTL_GENERIC_TABLE Table, _In_ BOOLEAN Restart)
 
_Must_inspect_result_ NTSYSAPI
PVOID NTAPI 
RtlEnumerateGenericTableWithoutSplaying (_In_ PRTL_GENERIC_TABLE Table, _Inout_ PVOID *RestartKey)
 
_Must_inspect_result_ NTSYSAPI
PVOID NTAPI 
RtlGetElementGenericTable (_In_ PRTL_GENERIC_TABLE Table, _In_ ULONG I)
 
NTSYSAPI ULONG NTAPI RtlNumberGenericTableElements (_In_ PRTL_GENERIC_TABLE Table)
 
_Must_inspect_result_ NTSYSAPI
BOOLEAN NTAPI 
RtlIsGenericTableEmpty (_In_ PRTL_GENERIC_TABLE Table)
 
NTSYSAPI PRTL_SPLAY_LINKS NTAPI RtlSplay (_Inout_ PRTL_SPLAY_LINKS Links)
 
NTSYSAPI PRTL_SPLAY_LINKS NTAPI RtlDelete (_In_ PRTL_SPLAY_LINKS Links)
 
NTSYSAPI VOID NTAPI RtlDeleteNoSplay (_In_ PRTL_SPLAY_LINKS Links, _Inout_ PRTL_SPLAY_LINKS *Root)
 
_Must_inspect_result_ NTSYSAPI
PRTL_SPLAY_LINKS NTAPI 
RtlSubtreeSuccessor (_In_ PRTL_SPLAY_LINKS Links)
 
_Must_inspect_result_ NTSYSAPI
PRTL_SPLAY_LINKS NTAPI 
RtlSubtreePredecessor (_In_ PRTL_SPLAY_LINKS Links)
 
_Must_inspect_result_ NTSYSAPI
PRTL_SPLAY_LINKS NTAPI 
RtlRealSuccessor (_In_ PRTL_SPLAY_LINKS Links)
 
_Must_inspect_result_ NTSYSAPI
PRTL_SPLAY_LINKS NTAPI 
RtlRealPredecessor (_In_ PRTL_SPLAY_LINKS Links)
 
_Must_inspect_result_ NTSYSAPI
NTSTATUS NTAPI 
RtlUpcaseUnicodeString (_When_(AllocateDestinationString, _Out_ _At_(DestinationString->Buffer, __drv_allocatesMem(Mem))) _When_(!AllocateDestinationString, _Inout_) PUNICODE_STRING DestinationString, _In_ PCUNICODE_STRING SourceString, _In_ BOOLEAN AllocateDestinationString)
 
NTSYSAPI VOID NTAPI RtlCopyString (_Out_ PSTRING DestinationString, _In_opt_ const STRING *SourceString)
 
NTSYSAPI ULONG NTAPI RtlWalkFrameChain (_Out_writes_(Count-(Flags >> RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT)) PVOID *Callers, _In_ ULONG Count, _In_ ULONG Flags)
 
 $endif (_NTDDK_) $if(_NTIFS_) _Must_inspect_result_ _Ret_maybenull_ _Post_writable_byte_size_(Size) NTSYSAPI PVOID NTAPI RtlAllocateHeap(_In_ HANDLE HeapHandle
 
NTSYSAPI VOID NTAPI RtlCaptureContext (_Out_ PCONTEXT ContextRecord)
 
 _Ret_range_ (<, MAXLONG) NTSYSAPI ULONG NTAPI RtlRandom(_Inout_ PULONG Seed)
 
_Must_inspect_result_ NTSYSAPI
NTSTATUS NTAPI 
RtlDowncaseUnicodeString (_When_(AllocateDestinationString, _Out_ _At_(UniDest->Buffer, __drv_allocatesMem(Mem))) _When_(!AllocateDestinationString, _Inout_) PUNICODE_STRING UniDest, _In_ PCUNICODE_STRING UniSource, _In_ BOOLEAN AllocateDestinationString)
 
*BytesInUnicodeString PWCH
_In_ ULONG _Out_opt_ PULONG 
_In_reads_bytes_ (BytesInMultiByteString) const CHAR *MultiByteString
 
 _In_reads_bytes_ (BytesInUnicodeString) PCWCH UnicodeString
 
*BytesInUnicodeString PWSTR
_In_ ULONG _Out_opt_ PULONG 
_In_reads_bytes_ (BytesInOemString) PCCH OemString
 
_Must_inspect_result_ NTSYSAPI
SIZE_T NTAPI 
RtlCompareMemoryUlong (_In_reads_bytes_(Length) PVOID Source, _In_ SIZE_T Length, _In_ ULONG Pattern)
 
NTSYSAPI VOID NTAPI RtlSecondsSince1980ToTime (_In_ ULONG ElapsedSeconds, _Out_ PLARGE_INTEGER Time)
 
NTSYSAPI VOID NTAPI RtlSecondsSince1970ToTime (_In_ ULONG ElapsedSeconds, _Out_ PLARGE_INTEGER Time)
 
_Must_inspect_result_ NTSYSAPI
BOOLEAN NTAPI 
RtlEqualSid (_In_ PSID Sid1, _In_ PSID Sid2)
 
NTSYSAPI PVOID NTAPI RtlFreeSid (_In_ _Post_invalid_ PSID Sid)
 
_Must_inspect_result_ NTSYSAPI
NTSTATUS NTAPI 
RtlAllocateAndInitializeSid (_In_ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, _In_ UCHAR SubAuthorityCount, _In_ ULONG SubAuthority0, _In_ ULONG SubAuthority1, _In_ ULONG SubAuthority2, _In_ ULONG SubAuthority3, _In_ ULONG SubAuthority4, _In_ ULONG SubAuthority5, _In_ ULONG SubAuthority6, _In_ ULONG SubAuthority7, _Outptr_ PSID *Sid)
 
NTSYSAPI PULONG NTAPI RtlSubAuthoritySid (_In_ PSID Sid, _In_ ULONG SubAuthority)
 
 _Post_satisfies_ (return >=8 &&return<=SECURITY_MAX_SID_SIZE) NTSYSAPI ULONG NTAPI RtlLengthSid(_In_ PSID Sid)
 
 _Out_writes_bytes_ (DestinationSidLength) PSID DestinationSid
 
_In_ ULONG _In_ ULONG _In_reads_bytes_ (AceListLength) PVOID AceList
 
NTSYSAPI NTSTATUS NTAPI RtlGetAce (_In_ PACL Acl, _In_ ULONG AceIndex, _Outptr_ PVOID *Ace)
 
NTSYSAPI NTSTATUS NTAPI RtlGetDaclSecurityDescriptor (_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN DaclPresent, _Out_ PACL *Dacl, _Out_ PBOOLEAN DaclDefaulted)
 
 _Out_range_ (>, 0)) _When_(Status >=0
 
 _Out_writes_bytes_to_ (MaxBytesInUnicodeString,*BytesInUnicodeString) PWCH UnicodeString
 
_In_ ULONG _Out_opt_ PULONG _In_reads_bytes_ (BytesInCustomCPString) PCH CustomCPString
 
 _Out_writes_bytes_to_ (MaxBytesInCustomCPString,*BytesInCustomCPString) PCH CustomCPString
 
 $endif (_NTIFS_)$if(_WDMDDK_) NTSYSAPI VOID FASTCALL RtlPrefetchMemoryNonTemporal(_In_ PVOID Source
 
 _In_range_ (<, BitMapHeader->SizeOfBitMap) ULONG BitNumber)
 
NTSYSAPI VOID NTAPI RtlSetBit (_In_ PRTL_BITMAP BitMapHeader, _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber)
 
_Must_inspect_result_ NTSYSAPI
BOOLEAN NTAPI 
RtlTestBit (_In_ PRTL_BITMAP BitMapHeader, _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber)
 
NTSYSAPI PVOID NTAPI RtlInsertElementGenericTableAvl (_In_ PRTL_AVL_TABLE Table, _In_reads_bytes_(BufferSize) PVOID Buffer, _In_ CLONG BufferSize, _Out_opt_ PBOOLEAN NewElement)
 
NTSYSAPI PVOID NTAPI RtlInsertElementGenericTableFullAvl (_In_ PRTL_AVL_TABLE Table, _In_reads_bytes_(BufferSize) PVOID Buffer, _In_ CLONG BufferSize, _Out_opt_ PBOOLEAN NewElement, _In_ PVOID NodeOrParent, _In_ TABLE_SEARCH_RESULT SearchResult)
 
NTSYSAPI BOOLEAN NTAPI RtlDeleteElementGenericTableAvl (_In_ PRTL_AVL_TABLE Table, _In_ PVOID Buffer)
 
_Must_inspect_result_ NTSYSAPI
PVOID NTAPI 
RtlLookupElementGenericTableAvl (_In_ PRTL_AVL_TABLE Table, _In_ PVOID Buffer)
 
NTSYSAPI PVOID NTAPI RtlLookupElementGenericTableFullAvl (_In_ PRTL_AVL_TABLE Table, _In_ PVOID Buffer, _Out_ PVOID *NodeOrParent, _Out_ TABLE_SEARCH_RESULT *SearchResult)
 
_Must_inspect_result_ NTSYSAPI
PVOID NTAPI 
RtlEnumerateGenericTableAvl (_In_ PRTL_AVL_TABLE Table, _In_ BOOLEAN Restart)
 
_Must_inspect_result_ NTSYSAPI
PVOID NTAPI 
RtlEnumerateGenericTableWithoutSplayingAvl (_In_ PRTL_AVL_TABLE Table, _Inout_ PVOID *RestartKey)
 
_Must_inspect_result_ NTSYSAPI
PVOID NTAPI 
RtlLookupFirstMatchingElementGenericTableAvl (_In_ PRTL_AVL_TABLE Table, _In_ PVOID Buffer, _Out_ PVOID *RestartKey)
 
_Must_inspect_result_ NTSYSAPI
PVOID NTAPI 
RtlEnumerateGenericTableLikeADirectory (_In_ PRTL_AVL_TABLE Table, _In_opt_ PRTL_AVL_MATCH_FUNCTION MatchFunction, _In_opt_ PVOID MatchData, _In_ ULONG NextFlag, _Inout_ PVOID *RestartKey, _Inout_ PULONG DeleteCount, _In_ PVOID Buffer)
 
_Must_inspect_result_ NTSYSAPI
PVOID NTAPI 
RtlGetElementGenericTableAvl (_In_ PRTL_AVL_TABLE Table, _In_ ULONG I)
 
NTSYSAPI ULONG NTAPI RtlNumberGenericTableElementsAvl (_In_ PRTL_AVL_TABLE Table)
 
_Must_inspect_result_ NTSYSAPI
BOOLEAN NTAPI 
RtlIsGenericTableEmptyAvl (_In_ PRTL_AVL_TABLE Table)
 
NTSYSAPI PVOID NTAPI RtlDestroyHeap (_In_ _Post_invalid_ PVOID HeapHandle)
 
NTSYSAPI USHORT NTAPI RtlCaptureStackBackTrace (_In_ ULONG FramesToSkip, _In_ ULONG FramesToCapture, _Out_writes_to_(FramesToCapture, return) PVOID *BackTrace, _Out_opt_ PULONG BackTraceHash)
 
_Must_inspect_result_ NTSYSAPI
NTSTATUS NTAPI 
RtlValidateUnicodeString (_In_ ULONG Flags, _In_ PCUNICODE_STRING String)
 
NTSYSAPI NTSTATUS NTAPI RtlGetCompressionWorkSpaceSize (_In_ USHORT CompressionFormatAndEngine, _Out_ PULONG CompressBufferWorkSpaceSize, _Out_ PULONG CompressFragmentWorkSpaceSize)
 
NTSYSAPI NTSTATUS NTAPI RtlCompressBuffer (_In_ USHORT CompressionFormatAndEngine, _In_reads_bytes_(UncompressedBufferSize) PUCHAR UncompressedBuffer, _In_ ULONG UncompressedBufferSize, _Out_writes_bytes_to_(CompressedBufferSize,*FinalCompressedSize) PUCHAR CompressedBuffer, _In_ ULONG CompressedBufferSize, _In_ ULONG UncompressedChunkSize, _Out_ PULONG FinalCompressedSize, _In_ PVOID WorkSpace)
 
 _Out_writes_bytes_to_ (UncompressedBufferSize,*FinalUncompressedSize) PUCHAR UncompressedBuffer
 
_In_ ULONG _In_reads_bytes_ (CompressedBufferSize) PUCHAR CompressedBuffer
 
 _Out_writes_bytes_to_ (UncompressedFragmentSize,*FinalUncompressedSize) PUCHAR UncompressedFragment
 
_In_ ULONG _In_ ULONG _In_range_ (<, CompressedBufferSize) ULONG FragmentOffset
 
_In_ ULONG _In_ ULONG _In_reads_bytes_ (CompressedTailSize) PUCHAR CompressedTail
 
_In_ ULONG _Out_writes_bytes_ (CompressedBufferSize) PUCHAR CompressedBuffer
 
_In_ ULONG _In_range_ (>=,(UncompressedBufferSize-(UncompressedBufferSize/16))) ULONG CompressedBufferSize
 
_In_ ULONG _Inout_updates_bytes_ (CompressedDataInfoLength) PCOMPRESSED_DATA_INFO CompressedDataInfo
 
_In_ ULONG _In_range_ (>, sizeof(COMPRESSED_DATA_INFO)) ULONG CompressedDataInfoLength
 
NTSYSAPI PUCHAR NTAPI RtlSubAuthorityCountSid (_In_ PSID Sid)
 
 _When_ (Status< 0, _Out_range_(>, 0)) _When_(Status >=0
 
NTSYSAPI VOID NTAPI RtlFillMemoryUlong (OUT PVOID Destination, IN SIZE_T Length, IN ULONG Pattern)
 
NTSYSAPI VOID NTAPI RtlFillMemoryUlonglong (_Out_writes_bytes_all_(Length) PVOID Destination, _In_ SIZE_T Length, _In_ ULONGLONG Pattern)
 
NTSYSAPI ULONGLONG NTAPI RtlIoDecodeMemIoResource (_In_ struct _IO_RESOURCE_DESCRIPTOR *Descriptor, _Out_opt_ PULONGLONG Alignment, _Out_opt_ PULONGLONG MinimumAddress, _Out_opt_ PULONGLONG MaximumAddress)
 
NTSYSAPI NTSTATUS NTAPI RtlIoEncodeMemIoResource (_In_ struct _IO_RESOURCE_DESCRIPTOR *Descriptor, _In_ UCHAR Type, _In_ ULONGLONG Length, _In_ ULONGLONG Alignment, _In_ ULONGLONG MinimumAddress, _In_ ULONGLONG MaximumAddress)
 
NTSYSAPI ULONGLONG NTAPI RtlCmDecodeMemIoResource (_In_ struct _CM_PARTIAL_RESOURCE_DESCRIPTOR *Descriptor, _Out_opt_ PULONGLONG Start)
 
NTSYSAPI NTSTATUS NTAPI RtlFindClosestEncodableLength (_In_ ULONGLONG SourceLength, _Out_ PULONGLONG TargetLength)
 
NTSYSAPI NTSTATUS NTAPI RtlCmEncodeMemIoResource (_In_ PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor, _In_ UCHAR Type, _In_ ULONGLONG Length, _In_ ULONGLONG Start)
 
NTSYSAPI BOOLEAN NTAPI RtlGetProductInfo (_In_ ULONG OSMajorVersion, _In_ ULONG OSMinorVersion, _In_ ULONG SpMajorVersion, _In_ ULONG SpMinorVersion, _Out_ PULONG ReturnedProductType)
 
NTSYSAPI NTSTATUS NTAPI RtlIsNormalizedString (_In_ ULONG NormForm, _In_ PCWSTR SourceString, _In_ LONG SourceStringLength, _Out_ PBOOLEAN Normalized)
 
NTSYSAPI NTSTATUS NTAPI RtlIdnToAscii (_In_ ULONG Flags, _In_ PCWSTR SourceString, _In_ LONG SourceStringLength, _Out_writes_to_(*DestinationStringLength,*DestinationStringLength) PWSTR DestinationString, _Inout_ PLONG DestinationStringLength)
 
NTSYSAPI NTSTATUS NTAPI RtlIdnToUnicode (IN ULONG Flags, IN PCWSTR SourceString, IN LONG SourceStringLength, OUT PWSTR DestinationString, IN OUT PLONG DestinationStringLength)
 
NTSYSAPI NTSTATUS NTAPI RtlIdnToNameprepUnicode (_In_ ULONG Flags, _In_ PCWSTR SourceString, _In_ LONG SourceStringLength, _Out_writes_to_(*DestinationStringLength,*DestinationStringLength) PWSTR DestinationString, _Inout_ PLONG DestinationStringLength)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateServiceSid (_In_ PUNICODE_STRING ServiceName, _Out_writes_bytes_opt_(*ServiceSidLength) PSID ServiceSid, _Inout_ PULONG ServiceSidLength)
 
NTSYSAPI LONG NTAPI RtlCompareAltitudes (_In_ PCUNICODE_STRING Altitude1, _In_ PCUNICODE_STRING Altitude2)
 
*UTF8StringActualByteCount
PCHAR _In_ ULONG _Out_ PULONG 
_In_reads_bytes_ (UnicodeStringByteCount) PCWCH UnicodeStringSource
 
*UnicodeStringActualByteCount
PWSTR _In_ ULONG _Out_ PULONG 
_In_reads_bytes_ (UTF8StringByteCount) PCCH UTF8StringSource
 
NTSYSAPI ULONG64 NTAPI RtlGetEnabledExtendedFeatures (IN ULONG64 FeatureMask)
 
 __drv_allocatesMem (Mem)) PRTL_DYNAMIC_HASH_TABLE *HashTable
 
NTSYSAPI VOID NTAPI RtlDeleteHashTable (_In_ _When_((HashTable->Flags &RTL_HASH_ALLOCATED_HEADER), __drv_freesMem(Mem) _Post_invalid_) PRTL_DYNAMIC_HASH_TABLE HashTable)
 
NTSYSAPI BOOLEAN NTAPI RtlInsertEntryHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _In_ __drv_aliasesMem PRTL_DYNAMIC_HASH_TABLE_ENTRY Entry, _In_ ULONG_PTR Signature, _Inout_opt_ PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context)
 
NTSYSAPI BOOLEAN NTAPI RtlRemoveEntryHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _In_ PRTL_DYNAMIC_HASH_TABLE_ENTRY Entry, _Inout_opt_ PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context)
 
_Must_inspect_result_ NTSYSAPI
PRTL_DYNAMIC_HASH_TABLE_ENTRY
NTAPI 
RtlLookupEntryHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _In_ ULONG_PTR Signature, _Out_opt_ PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context)
 
_Must_inspect_result_ NTSYSAPI
PRTL_DYNAMIC_HASH_TABLE_ENTRY
NTAPI 
RtlGetNextEntryHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _In_ PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context)
 
NTSYSAPI BOOLEAN NTAPI RtlInitEnumerationHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _Out_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
 
_Must_inspect_result_ NTSYSAPI
PRTL_DYNAMIC_HASH_TABLE_ENTRY
NTAPI 
RtlEnumerateEntryHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _Inout_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
 
NTSYSAPI VOID NTAPI RtlEndEnumerationHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _Inout_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
 
NTSYSAPI BOOLEAN NTAPI RtlInitWeakEnumerationHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _Out_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
 
_Must_inspect_result_ NTSYSAPI
PRTL_DYNAMIC_HASH_TABLE_ENTRY
NTAPI 
RtlWeaklyEnumerateEntryHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _Inout_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
 
NTSYSAPI VOID NTAPI RtlEndWeakEnumerationHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _Inout_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
 
NTSYSAPI BOOLEAN NTAPI RtlExpandHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
 
NTSYSAPI BOOLEAN NTAPI RtlContractHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateVirtualAccountSid (_In_ PCUNICODE_STRING Name, _In_ ULONG BaseSubAuthority, _Out_writes_bytes_(*SidLength) PSID Sid, _Inout_ PULONG SidLength)
 
static __inline LARGE_INTEGER
NTAPI_INLINE 
RtlConvertUlongToLargeInteger (_In_ ULONG UnsignedInteger)
 
static __inline LARGE_INTEGER
NTAPI_INLINE 
RtlLargeIntegerShiftLeft (_In_ LARGE_INTEGER LargeInteger, _In_ CCHAR ShiftCount)
 
static __inline LARGE_INTEGER
NTAPI_INLINE 
RtlLargeIntegerShiftRight (_In_ LARGE_INTEGER LargeInteger, _In_ CCHAR ShiftCount)
 
static __inline ULONG NTAPI_INLINE RtlEnlargedUnsignedDivide (_In_ ULARGE_INTEGER Dividend, _In_ ULONG Divisor, _Out_opt_ PULONG Remainder)
 
static __inline LARGE_INTEGER
NTAPI_INLINE 
RtlLargeIntegerNegate (_In_ LARGE_INTEGER Subtrahend)
 
static __inline LARGE_INTEGER
NTAPI_INLINE 
RtlLargeIntegerSubtract (_In_ LARGE_INTEGER Minuend, _In_ LARGE_INTEGER Subtrahend)
 
static __inline LARGE_INTEGER
NTAPI_INLINE 
RtlEnlargedUnsignedMultiply (_In_ ULONG Multiplicand, _In_ ULONG Multiplier)
 
static __inline LARGE_INTEGER
NTAPI_INLINE 
RtlEnlargedIntegerMultiply (_In_ LONG Multiplicand, _In_ LONG Multiplier)
 
 _At_ (AnsiString->Buffer, _Post_equal_to_(Buffer)) _At_(AnsiString-> Length, _Post_equal_to_(0)) _At_(AnsiString->MaximumLength, _Post_equal_to_(BufferSize)) FORCEINLINE VOID RtlInitEmptyAnsiString(_Out_ PANSI_STRING AnsiString, _Pre_maybenull_ _Pre_readable_size_(BufferSize) __drv_aliasesMem PCHAR Buffer, _In_ USHORT BufferSize)
 
 _At_ (UnicodeString->Buffer, _Post_equal_to_(Buffer)) _At_(UnicodeString-> Length, _Post_equal_to_(0)) _At_(UnicodeString->MaximumLength, _Post_equal_to_(BufferSize)) FORCEINLINE VOID RtlInitEmptyUnicodeString(_Out_ PUNICODE_STRING UnicodeString, _Writable_bytes_(BufferSize) _When_(BufferSize!=0
 
static __inline LARGE_INTEGER
NTAPI_INLINE 
RtlLargeIntegerArithmeticShift (_In_ LARGE_INTEGER LargeInteger, _In_ CCHAR ShiftCount)
 
FORCEINLINE PVOID RtlSecureZeroMemory (_Out_writes_bytes_all_(Size) PVOID Pointer, _In_ SIZE_T Size)
 
FORCEINLINE VOID InitializeSListHead (_Out_ PSLIST_HEADER SListHead)
 
BOOLEAN RTLVERLIB_DDI() RtlIsNtDdiVersionAvailable (_In_ ULONG Version)
 
BOOLEAN RTLVERLIB_DDI() RtlIsServicePackVersionInstalled (_In_ ULONG Version)
 
FORCEINLINE LUID NTAPI_INLINE RtlConvertUlongToLuid (_In_ ULONG Val)
 
NTSYSAPI VOID NTAPI RtlGetCallersAddress (_Out_ PVOID *CallersAddress, _Out_ PVOID *CallersCaller)
 
FORCEINLINE VOID NTAPI RtlInitHashTableContext (_Inout_ PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context)
 
FORCEINLINE VOID NTAPI RtlInitHashTableContextFromEnumerator (_Inout_ PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context, _In_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
 
FORCEINLINE VOID NTAPI RtlReleaseHashTableContext (_Inout_ PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context)
 
FORCEINLINE ULONG NTAPI RtlTotalBucketsHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
 
FORCEINLINE ULONG NTAPI RtlNonEmptyBucketsHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
 
FORCEINLINE ULONG NTAPI RtlEmptyBucketsHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
 
FORCEINLINE ULONG NTAPI RtlTotalEntriesHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
 
FORCEINLINE ULONG NTAPI RtlActiveEnumeratorsHashTable (_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
 

Variables

_Out_ GUIDGuid
 
_In_ ULONG StartingIndex
 
_In_ ULONG _In_ ULONG Length
 
_Out_ _Inout_ PUNICODE_STRING DestinationString
 
_Out_ _Inout_ PUNICODE_STRING
_In_ PANSI_STRING 
SourceString
 
_Out_ _Inout_ PUNICODE_STRING
_In_ PANSI_STRING _In_ BOOLEAN 
AllocateDestinationString
 
_In_ PWSTR Path
 
_In_ PCUNICODE_STRING String2
 
_In_ PCUNICODE_STRING _In_ BOOLEAN CaseInSensitive
 
_In_ SIZE_T String1Length
 
_In_ SIZE_T _In_ SIZE_T String2Length
 
_In_ ULONG Revision
 
_In_ PCWSTR _In_z_ PCWSTR ValueName
 
_In_ ULONG NumberToFind
 
_In_ ULONG _In_ ULONG HintIndex
 
_In_ PCWSTR _Inout_ _At_ QueryTable EntryContext
 
_In_ PCWSTR _Inout_ _At_
QueryTable _Pre_unknown_
PRTL_QUERY_REGISTRY_TABLE 
QueryTable
 
_In_ PCWSTR _Inout_ _At_
QueryTable _Pre_unknown_
PRTL_QUERY_REGISTRY_TABLE
_In_opt_ PVOID 
Context
 
_In_ PCWSTR _Inout_ _At_
QueryTable _Pre_unknown_
PRTL_QUERY_REGISTRY_TABLE
_In_opt_ PVOID _In_opt_ PVOID 
Environment
 
_In_ BOOLEAN DaclPresent
 
_In_ BOOLEAN _In_opt_ PACL Dacl
 
_In_ BOOLEAN _In_opt_ PACL
_In_opt_ BOOLEAN 
DaclDefaulted
 
_Out_ PLARGE_INTEGER Time
 
_In_opt_ ULONG Base
 
_In_opt_ ULONG _Out_ PULONG Value
 
_In_ ULONG SecurityDescriptorLength
 
_In_ ULONG _In_
SECURITY_INFORMATION 
RequiredInformation
 
_In_ ULONG TypeMask
 
_In_ ULONG _In_ ULONGLONG ConditionMask
 
_In_ PCWSTR _In_z_ PCWSTR _In_
ULONG 
ValueType
 
_In_ PCWSTR _In_z_ PCWSTR _In_
ULONG _In_ ULONG 
ValueLength
 
_In_ PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine
 
_In_
PRTL_GENERIC_COMPARE_ROUTINE
_In_
PRTL_GENERIC_ALLOCATE_ROUTINE 
AllocateRoutine
 
_In_
PRTL_GENERIC_COMPARE_ROUTINE
_In_
PRTL_GENERIC_ALLOCATE_ROUTINE
_In_ PRTL_GENERIC_FREE_ROUTINE 
FreeRoutine
 
_In_
PRTL_GENERIC_COMPARE_ROUTINE
_In_
PRTL_GENERIC_ALLOCATE_ROUTINE
_In_ PRTL_GENERIC_FREE_ROUTINE
_In_opt_ PVOID 
TableContext
 
_In_ PGENERIC_MAPPING GenericMapping
 
_Out_ PUNICODE_STRING DosName
 
_In_opt_ ULONG Flags
 
_In_opt_ ULONG _In_ SIZE_T Size
 
_In_opt_ ULONG _In_
_Post_invalid_ PVOID 
BaseAddress
 
_In_ const STRING _In_ BOOLEAN CaseInsensitive
 
_In_ const STRINGSource
 
*BytesInUnicodeString PWCH UnicodeString
 
*BytesInUnicodeString PWCH
_In_ ULONG 
MaxBytesInUnicodeString
 
*BytesInUnicodeString PWCH
_In_ ULONG _Out_opt_ PULONG 
BytesInUnicodeString
 
*BytesInUnicodeString PWCH
_In_ ULONG _Out_opt_ PULONG
_In_ ULONG 
BytesInMultiByteString
 
*BytesInMultiByteString PCHAR MultiByteString
 
*BytesInMultiByteString PCHAR
_In_ ULONG 
MaxBytesInMultiByteString
 
*BytesInUnicodeString PWSTR
_In_ ULONG _Out_opt_ PULONG
_In_ ULONG 
BytesInOemString
 
*BytesInOemString PCHAR OemString
 
*BytesInOemString PCHAR _In_ ULONG MaxBytesInOemString
 
_In_ BOOLEAN AllowExtendedCharacters
 
_In_ BOOLEAN _Inout_
PGENERATE_NAME_CONTEXT _Inout_
PUNICODE_STRING 
Name8dot3
 
_Inout_opt_ POEM_STRING OemName
 
_Inout_opt_ POEM_STRING
_Out_opt_ PBOOLEAN 
NameContainsSpaces
 
_In_ __drv_aliasesMem PSTRING Prefix
 
_In_ __drv_aliasesMem PSTRING
_Out_ PPREFIX_TABLE_ENTRY 
PrefixTableEntry
 
_In_ PSTRING FullName
 
_In_ PUNICODE_STRING _In_ ULONG CaseInsensitiveIndex
 
_In_ BOOLEAN Restart
 
_Out_ PULONG ElapsedSeconds
 
_In_ PSID Sid2
 
_In_ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
 
_In_ PSID_IDENTIFIER_AUTHORITY
_In_ UCHAR 
SubAuthorityCount
 
_In_ PSID SourceSid
 
_In_ PSID Sid
 
_In_ PLUID SourceLuid
 
_In_ ULONG AclLength
 
_In_ ULONG _In_ ULONG AclRevision
 
_In_ ULONG AceRevision
 
_In_ ULONG _In_ ULONG StartingAceIndex
 
_In_ ULONG _In_ ULONG _In_ ULONG AceListLength
 
_In_ ULONG AceIndex
 
_In_ ULONG _In_ ACCESS_MASK AccessMask
 
_In_ ULONG _In_ ULONG AceFlags
 
_In_opt_ PSID Owner
 
_In_opt_ PSID _In_opt_ BOOLEAN OwnerDefaulted
 
_In_ ULONG _Out_opt_ PULONG
_In_ ULONG 
BytesInCustomCPString
 
_In_ ULONG MaxBytesInCustomCPString
 
_Out_ PCPTABLEINFO CodePageTable
 
_In_ BOOLEAN _In_ ULONG HashAlgorithm
 
_In_ BOOLEAN _In_ ULONG _Out_
PULONG 
HashValue
 
_In_opt_ PVOID HeapBase
 
_In_opt_ PVOID _In_opt_ SIZE_T ReserveSize
 
_In_opt_ PVOID _In_opt_ SIZE_T
_In_opt_ SIZE_T 
CommitSize
 
_In_opt_ PVOID _In_opt_ SIZE_T
_In_opt_ SIZE_T _In_opt_ PVOID 
Lock
 
_In_opt_ PVOID _In_opt_ SIZE_T
_In_opt_ SIZE_T _In_opt_ PVOID
_In_opt_ PRTL_HEAP_PARAMETERS 
Parameters
 
_In_ ULONG UncompressedBufferSize
 
_In_ ULONG _In_ ULONG CompressedBufferSize
 
_In_ ULONG _In_ ULONG _Out_ PULONG FinalUncompressedSize
 
_In_ ULONG UncompressedFragmentSize
 
_In_ ULONG _In_ ULONG _Out_
PULONG _In_ PVOID 
WorkSpace
 
_Inout_ PUCHARCompressedBuffer
 
_Inout_ PUCHAR _In_ PUCHAR EndOfCompressedBufferPlus1
 
_Inout_ PUCHAR _In_ PUCHAR
_Out_ PUCHAR
ChunkBuffer
 
_Inout_ PUCHAR _In_ PUCHAR
_Out_ PUCHAR _Out_ PULONG 
ChunkSize
 
_In_ ULONG _In_ ULONG _In_ ULONG CompressedTailSize
 
_In_ ULONG _In_ ULONG _In_
ULONG _In_
PCOMPRESSED_DATA_INFO 
CompressedDataInfo
 
_Out_ PBOOLEAN SaclPresent
 
_Out_ PBOOLEAN _Out_ PACLSacl
 
_Out_ PBOOLEAN _Out_ PACL
_Out_ PBOOLEAN 
SaclDefaulted
 
_In_opt_ PSID Group
 
_In_opt_ PSID _In_opt_ BOOLEAN GroupDefaulted
 
_Out_writes_bytes_to_opt_
BufferLength
PSECURITY_DESCRIPTOR 
SelfRelativeSecurityDescriptor
 
_Out_writes_bytes_to_opt_
BufferLength
PSECURITY_DESCRIPTOR _Inout_
PULONG 
BufferLength
 
_Out_writes_bytes_to_opt_
AbsoluteSecurityDescriptorSize
PSECURITY_DESCRIPTOR 
AbsoluteSecurityDescriptor
 
_Out_writes_bytes_to_opt_
AbsoluteSecurityDescriptorSize
PSECURITY_DESCRIPTOR _Inout_
PULONG 
AbsoluteSecurityDescriptorSize
 
_Out_writes_bytes_to_opt_
AbsoluteSecurityDescriptorSize
PSECURITY_DESCRIPTOR _Inout_
PULONG
_Out_writes_bytes_to_opt_
DaclSize PACL _Inout_ PULONG 
DaclSize
 
_Out_writes_bytes_to_opt_
AbsoluteSecurityDescriptorSize
PSECURITY_DESCRIPTOR _Inout_
PULONG
_Out_writes_bytes_to_opt_
DaclSize PACL _Inout_ PULONG
_Out_writes_bytes_to_opt_
SaclSize PACL _Inout_ PULONG 
SaclSize
 
_Out_writes_bytes_to_opt_
AbsoluteSecurityDescriptorSize
PSECURITY_DESCRIPTOR _Inout_
PULONG
_Out_writes_bytes_to_opt_
DaclSize PACL _Inout_ PULONG
_Out_writes_bytes_to_opt_
SaclSize PACL _Inout_ PULONG
_Out_writes_bytes_to_opt_
OwnerSize PSID _Inout_ PULONG 
OwnerSize
 
_Out_writes_bytes_to_opt_
AbsoluteSecurityDescriptorSize
PSECURITY_DESCRIPTOR _Inout_
PULONG
_Out_writes_bytes_to_opt_
DaclSize PACL _Inout_ PULONG
_Out_writes_bytes_to_opt_
SaclSize PACL _Inout_ PULONG
_Out_writes_bytes_to_opt_
OwnerSize PSID _Inout_ PULONG
_Out_writes_bytes_to_opt_
PrimaryGroupSize PSID 
PrimaryGroup
 
_Out_writes_bytes_to_opt_
AbsoluteSecurityDescriptorSize
PSECURITY_DESCRIPTOR _Inout_
PULONG
_Out_writes_bytes_to_opt_
DaclSize PACL _Inout_ PULONG
_Out_writes_bytes_to_opt_
SaclSize PACL _Inout_ PULONG
_Out_writes_bytes_to_opt_
OwnerSize PSID _Inout_ PULONG
_Out_writes_bytes_to_opt_
PrimaryGroupSize PSID _Inout_
PULONG 
PrimaryGroupSize
 
_In_ __inner_callback
PRTL_RUN_ONCE_INIT_FN 
InitFn
 
_In_ __inner_callback
PRTL_RUN_ONCE_INIT_FN
_Inout_opt_ PVOID 
Parameter
 
_In_ PCWSTR _In_ LONG SourceStringLength
 
_In_ PCWSTR _In_ LONG
_Out_writes_to_
DestinationStringLength PWSTR
_Inout_ PLONG 
DestinationStringLength
 
*UTF8StringActualByteCount PCHAR UTF8StringDestination
 
*UTF8StringActualByteCount
PCHAR _In_ ULONG 
UTF8StringMaxByteCount
 
*UTF8StringActualByteCount
PCHAR _In_ ULONG _Out_ PULONG 
UTF8StringActualByteCount
 
*UTF8StringActualByteCount
PCHAR _In_ ULONG _Out_ PULONG
_In_ ULONG 
UnicodeStringByteCount
 
*UnicodeStringActualByteCount PWSTR UnicodeStringDestination
 
*UnicodeStringActualByteCount
PWSTR _In_ ULONG 
UnicodeStringMaxByteCount
 
*UnicodeStringActualByteCount
PWSTR _In_ ULONG _Out_ PULONG 
UnicodeStringActualByteCount
 
*UnicodeStringActualByteCount
PWSTR _In_ ULONG _Out_ PULONG
_In_ ULONG 
UTF8StringByteCount
 
_In_ ULONG Shift
 
_In_ PSID OldSid
 
_In_ PSID _In_ PSID NewSid
 
_In_ PSID _In_ PSID _Out_ ULONGNumChanges
 
_Notnull_ __drv_aliasesMem PWSTR Buffer = Buffer
 
_Notnull_ __drv_aliasesMem
PWSTR _In_ USHORT 
BufferSize
 
UnicodeString MaximumLength = BufferSize
 
_In_ LARGE_INTEGER Divisor
 
_In_ LARGE_INTEGER _Out_opt_
PLARGE_INTEGER 
Remainder
 
_In_ LARGE_INTEGER Addend2
 
ret QuadPart = Addend1.QuadPart + Addend2.QuadPart
 
return ret
 

Macro Definition Documentation

#define __assert_annotationA (   msg)    DbgPrint("Assertion failed at %s(%d): %s\n", __FILE__, __LINE__, msg)

Definition at line 3207 of file rtlfuncs.h.

#define __assert_annotationW (   msg)    DbgPrint("Assertion failed at %s(%d): %S\n", __FILE__, __LINE__, msg)

Definition at line 3209 of file rtlfuncs.h.

#define ASSERT (   exp)    ((void)0)

Definition at line 3277 of file rtlfuncs.h.

#define ASSERTMSG (   msg,
  exp 
)    ((void)0)

Definition at line 3278 of file rtlfuncs.h.

#define FAST_FAIL_CORRUPT_LIST_ENTRY   3

Referenced by FatalListEntryError().

#define FAST_FAIL_FATAL_APP_EXIT   7
#define FAST_FAIL_GS_COOKIE_INIT   6
#define FAST_FAIL_GUARD_ICALL_CHECK_FAILURE   10
#define FAST_FAIL_GUARD_WRITE_CHECK_FAILURE   11
#define FAST_FAIL_INCORRECT_STACK   4
#define FAST_FAIL_INVALID_ARG   5
#define FAST_FAIL_INVALID_FAST_FAIL_CODE   0xFFFFFFFF
#define FAST_FAIL_INVALID_FIBER_SWITCH   12
#define FAST_FAIL_INVALID_JUMP_BUFFER   18
#define FAST_FAIL_INVALID_REFERENCE_COUNT   14
#define FAST_FAIL_INVALID_SET_OF_CONTEXT   13
#define FAST_FAIL_LEGACY_GS_VIOLATION   0
#define FAST_FAIL_MRDATA_MODIFIED   19
#define FAST_FAIL_RANGE_CHECK_FAILURE   8
#define FAST_FAIL_STACK_COOKIE_CHECK_FAILURE   2
#define FAST_FAIL_UNSAFE_REGISTRY_ACCESS   9
#define FAST_FAIL_VTGUARD_CHECK_FAILURE   1
#define FIRSTBYTE (   VALUE)    ((VALUE) & LOWBYTE_MASK)

Definition at line 795 of file rtlfuncs.h.

#define FOURTHBYTE (   VALUE)    (((VALUE) >> 24) & LOWBYTE_MASK)

Definition at line 798 of file rtlfuncs.h.

#define InitializeListHead32 (   ListHead)
Value:
(\
(ListHead)->Flink = (ListHead)->Blink = PtrToUlong((ListHead)))
#define PtrToUlong(p)
Definition: basetsd.h:82

Definition at line 3328 of file rtlfuncs.h.

#define InterlockedFlushSList (   SListHead)    ExpInterlockedFlushSList(SListHead)

Definition at line 3397 of file rtlfuncs.h.

#define InterlockedPopEntrySList (   SListHead)    ExpInterlockedPopEntrySList(SListHead)

Definition at line 3394 of file rtlfuncs.h.

#define InterlockedPushEntrySList (   SListHead,
  SListEntry 
)    ExpInterlockedPushEntrySList(SListHead, SListEntry)

Definition at line 3391 of file rtlfuncs.h.

#define LONG_MASK   (LONG_SIZE - 1)

Definition at line 791 of file rtlfuncs.h.

#define LONG_SIZE   (sizeof(LONG))

Definition at line 789 of file rtlfuncs.h.

#define LONGLONG_MASK   (LONGLONG_SIZE - 1)

Definition at line 792 of file rtlfuncs.h.

#define LONGLONG_SIZE   (sizeof(LONGLONG))

Definition at line 790 of file rtlfuncs.h.

#define LOWBYTE_MASK   0x00FF

Definition at line 793 of file rtlfuncs.h.

#define NT_ANALYSIS_ASSUME (   _exp)    __noop(_exp)

Definition at line 3218 of file rtlfuncs.h.

#define NT_ASSERT   NT_ASSERT_NOASSUME

Definition at line 3312 of file rtlfuncs.h.

Referenced by _Success_(), AddQueue(), AhciAllocateResourceForAdapter(), AhciATAPI_CFIS(), AhciATAPICommand(), AhciBuild_PRDT(), AhciCommandCompletionDpcRoutine(), AhciCompleteIssuedSrb(), AhciGetLba(), AhciHwFindAdapter(), AhciHwInterrupt(), AhciHwStartIo(), AhciInterruptHandler(), AhciPortInitialize(), AhciProcessIO(), AhciProcessSrb(), AhciStartPort(), AllocW32Thread(), AtapiInquiryCompletion(), BRUSH::bAllocateBrushAttr(), BlResourceFindMessage(), Bus_PDO_QueryDeviceId(), BRUSH::cjGetObject(), ClasspPowerDownCompletion(), ClasspPowerUpCompletion(), co_UserFreeWindow(), CreateBrushInternal(), CreateDeviceSecurityDescriptor(), DC_AllocDcWithHandle(), DC_vRestoreDC(), DecrementGdiHandleCount(), DeviceInquiryRequest(), DeviceReportLuns(), DeviceRequestCapacity(), DeviceRequestReadWrite(), DeviceRequestSense(), DriverEntry(), EBRUSHOBJ_psoMask(), EngBitBlt(), EngPaint(), EngQueryLocalTime(), GDI_InternalBezier(), GDIOBJ_vFreeObject(), GDIOBJ_vSetObjectOwner(), GetBrushAttrPool(), GetProcessorInformation(), IncrementGdiHandleCount(), InquiryCompletion(), IntCopyRegistryValue(), IntCreateCurIconHandle(), IntDdePostMessageHook(), IntGdiBitBltRgn(), IntGdiCreatePatternBrush(), IntGdiExtCreatePen(), IntGdiFillRgn(), IntGetGlobalHookHandles(), IntGetProp(), IntInitializeVideoAddressSpace(), IntInsertCursorIntoList(), IntInsertMenuItem(), IntRemoveCursorFromList(), IntSetAconData(), IntSetCursorData(), IsPortValid(), MmHapFindBufferInFreeList(), MsqDestroyMessageQueue(), NpInitializeAliases(), NpQueryClientProcess(), NpTranslateAlias(), PackParam(), PDEVOBJ_pSurface(), PinCaptureProcess(), RawInputThreadMain(), REGION_bAllocRgnAttr(), REGION_bGrowBufferSize(), REGION_bMakeSimpleFrameRgn(), REGION_bOffsetRgn(), REGION_bXformRgn(), REGION_UnlockRgn(), REGION_vAddRect(), REGION_vSyncRegion(), RemoveQueue(), SepRmDeleteLogonSession(), SURFACE_AllocSurface(), UnloadKbdFile(), UnsafeSetBitmapBits(), UserGetProp(), UserInitialize(), UserRemoveWindowProps(), UserScrollDC(), BRUSH::vDeleteObject(), BRUSH::vSetSolidColor(), and XFORMOBJ_bXformFixPoints().

#define NT_ASSERT_ACTION (   exp)
Value:
((!(exp)) ? \
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define __assert_annotationA(msg)
Definition: rtlfuncs.h:3207
#define NT_ANALYSIS_ASSUME(_exp)
Definition: rtlfuncs.h:3218
DWORD exp
Definition: msg.c:15520
#define DbgRaiseAssertionFailure
Definition: ke.h:164

Definition at line 3221 of file rtlfuncs.h.

#define NT_ASSERT_ASSUME (   exp)    (NT_ANALYSIS_ASSUME(exp), (void)0)

Definition at line 3293 of file rtlfuncs.h.

#define NT_ASSERT_NOASSUME (   exp)    ((void)0)

Definition at line 3297 of file rtlfuncs.h.

#define NT_ASSERTMSG   NT_ASSERTMSG_NOASSUME

Definition at line 3313 of file rtlfuncs.h.

#define NT_ASSERTMSG_ACTION (   msg,
  exp 
)
Value:
((!(exp)) ? \
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define __assert_annotationA(msg)
Definition: rtlfuncs.h:3207
#define NT_ANALYSIS_ASSUME(_exp)
Definition: rtlfuncs.h:3218
UINT msg
Definition: msvc.h:92
DWORD exp
Definition: msg.c:15520
#define DbgRaiseAssertionFailure
Definition: ke.h:164

Definition at line 3227 of file rtlfuncs.h.

#define NT_ASSERTMSG_ASSUME (   msg,
  exp 
)    (NT_ANALYSIS_ASSUME(exp), (void)0)

Definition at line 3294 of file rtlfuncs.h.

#define NT_ASSERTMSG_NOASSUME (   msg,
  exp 
)    ((void)0)

Definition at line 3298 of file rtlfuncs.h.

#define NT_ASSERTMSGW   NT_ASSERTMSGW_NOASSUME

Definition at line 3314 of file rtlfuncs.h.

Referenced by ClassDispatchPnp().

#define NT_ASSERTMSGW_ACTION (   msg,
  exp 
)
Value:
((!(exp)) ? \
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_ANALYSIS_ASSUME(_exp)
Definition: rtlfuncs.h:3218
#define __assert_annotationW(msg)
Definition: rtlfuncs.h:3209
UINT msg
Definition: msvc.h:92
DWORD exp
Definition: msg.c:15520
#define DbgRaiseAssertionFailure
Definition: ke.h:164

Definition at line 3233 of file rtlfuncs.h.

#define NT_ASSERTMSGW_ASSUME (   msg,
  exp 
)    (NT_ANALYSIS_ASSUME(exp), (void)0)

Definition at line 3295 of file rtlfuncs.h.

#define NT_ASSERTMSGW_NOASSUME (   msg,
  exp 
)    ((void)0)

Definition at line 3299 of file rtlfuncs.h.

#define NT_FRE_ASSERT   (void)NT_ASSERT_ACTION

Definition at line 3303 of file rtlfuncs.h.

#define NT_FRE_ASSERTMSG   (void)NT_ASSERTMSG_ACTION

Definition at line 3304 of file rtlfuncs.h.

#define NT_FRE_ASSERTMSGW   (void)NT_ASSERTMSGW_ACTION

Definition at line 3305 of file rtlfuncs.h.

#define NT_VERIFYMSG (   msg,
  exp 
)    (NT_ANALYSIS_ASSUME(exp), ((exp) ? TRUE : FALSE))

Definition at line 3290 of file rtlfuncs.h.

#define NT_VERIFYMSGW (   msg,
  exp 
)    (NT_ANALYSIS_ASSUME(exp), ((exp) ? TRUE : FALSE))

Definition at line 3291 of file rtlfuncs.h.

#define QueryDepthSList (   SListHead)    ExQueryDepthSList(SListHead)

Definition at line 3402 of file rtlfuncs.h.

#define RTL_CONTEXT_CHUNK (   Context,
  Chunk 
)
Value:
(PCONTEXT_EX)(Context + 1), \
Chunk)
#define RTL_CONTEXT_EX_CHUNK(Base, Layout, Chunk)
Definition: rtlfuncs.h:3409

Definition at line 3415 of file rtlfuncs.h.

#define RTL_CONTEXT_EX_CHUNK (   Base,
  Layout,
  Chunk 
)    ((PVOID)((PCHAR)(Base) + RTL_CONTEXT_EX_OFFSET(Layout, Chunk)))

Definition at line 3409 of file rtlfuncs.h.

#define RTL_CONTEXT_EX_LENGTH (   ContextEx,
  Chunk 
)    ((ContextEx)->Chunk.Length)

Definition at line 3408 of file rtlfuncs.h.

#define RTL_CONTEXT_EX_OFFSET (   ContextEx,
  Chunk 
)    ((ContextEx)->Chunk.Offset)

Definition at line 3407 of file rtlfuncs.h.

#define RTL_CONTEXT_LENGTH (   Context,
  Chunk 
)    RTL_CONTEXT_EX_LENGTH((PCONTEXT_EX)(Context + 1), Chunk)

Definition at line 3413 of file rtlfuncs.h.

#define RTL_CONTEXT_OFFSET (   Context,
  Chunk 
)    RTL_CONTEXT_EX_OFFSET((PCONTEXT_EX)(Context + 1), Chunk)

Definition at line 3411 of file rtlfuncs.h.

#define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING   2
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE   1
#define RTL_SOFT_ASSERT (   exp)    ((void)0)

Definition at line 3280 of file rtlfuncs.h.

#define RTL_SOFT_ASSERTMSG (   msg,
  exp 
)    ((void)0)

Definition at line 3281 of file rtlfuncs.h.

#define RTL_SOFT_VERIFY (   exp)    ((exp) ? TRUE : FALSE)

Definition at line 3286 of file rtlfuncs.h.

#define RTL_SOFT_VERIFYMSG (   msg,
  exp 
)    ((exp) ? TRUE : FALSE)

Definition at line 3287 of file rtlfuncs.h.

#define RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT   8

Definition at line 1177 of file rtlfuncs.h.

#define RTL_STATIC_LIST_HEAD (   x)    LIST_ENTRY x = { &x, &x }

Definition at line 44 of file rtlfuncs.h.

#define RTL_VERIFY (   exp)    ((exp) ? TRUE : FALSE)

Definition at line 3283 of file rtlfuncs.h.

#define RTL_VERIFYMSG (   msg,
  exp 
)    ((exp) ? TRUE : FALSE)

Definition at line 3284 of file rtlfuncs.h.

#define RtlAnsiStringToUnicodeSize (   String)
Value:
( \
)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
BOOLEAN NLS_MB_CODE_PAGE_TAG
__wchar_t WCHAR
Definition: xmlstorage.h:180
CHAR16 * String
Definition: acefiex.h:201
#define ANSI_NULL
VOID UINTN Length
Definition: acefiex.h:744
NTSYSAPI ULONG NTAPI RtlxAnsiStringToUnicodeSize(PCANSI_STRING AnsiString)

Definition at line 426 of file rtlfuncs.h.

#define RtlCopyBytes   RtlCopyMemory

Definition at line 282 of file rtlfuncs.h.

Referenced by FreeBT_QueryWmiDataBlock(), and START_TEST().

#define RtlCopyMemory (   Destination,
  Source,
  Length 
)    memcpy(Destination, Source, Length)

Definition at line 279 of file rtlfuncs.h.

#define RtlCopyMemoryNonTemporal   RtlCopyMemory

Definition at line 293 of file rtlfuncs.h.

Referenced by START_TEST().

#define RtlEqualMemory (   Destination,
  Source,
  Length 
)    (!memcmp(Destination, Source, Length))

Definition at line 310 of file rtlfuncs.h.

#define RtlFillBytes   RtlFillMemory

Definition at line 322 of file rtlfuncs.h.

Referenced by START_TEST().

#define RtlFillMemory (   Destination,
  Length,
  Fill 
)    memset(Destination, Fill, Length)

Definition at line 319 of file rtlfuncs.h.

#define RtlInitializeSplayLinks (   Links)
Value:
{ \
PRTL_SPLAY_LINKS _SplayLinks; \
_SplayLinks = (PRTL_SPLAY_LINKS)(Links); \
_SplayLinks->Parent = _SplayLinks; \
_SplayLinks->LeftChild = NULL; \
_SplayLinks->RightChild = NULL; \
}
smooth NULL
Definition: ftsmooth.c:513
struct _RTL_SPLAY_LINKS * PRTL_SPLAY_LINKS

Referenced by CdInsertNameLink(), FatInsertName(), FsRtlAddToTunnelCache(), RtlInsertElementGenericTableFull(), and RtlInsertUnicodePrefix().

#define RtlInsertAsLeftChild (   ParentLinks,
  ChildLinks 
)
Value:
{ \
PRTL_SPLAY_LINKS _SplayParent; \
PRTL_SPLAY_LINKS _SplayChild; \
_SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
_SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
_SplayParent->LeftChild = _SplayChild; \
_SplayChild->Parent = _SplayParent; \
}
struct _RTL_SPLAY_LINKS * PRTL_SPLAY_LINKS

Referenced by CdInsertNameLink(), FatInsertName(), FixupChildLinks(), FsRtlAddToTunnelCache(), RtlInsertElementGenericTableFull(), RtlInsertUnicodePrefix(), and SwapSplayLinks().

#define RtlInsertAsRightChild (   ParentLinks,
  ChildLinks 
)
Value:
{ \
PRTL_SPLAY_LINKS _SplayParent; \
PRTL_SPLAY_LINKS _SplayChild; \
_SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
_SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
_SplayParent->RightChild = _SplayChild; \
_SplayChild->Parent = _SplayParent; \
}
struct _RTL_SPLAY_LINKS * PRTL_SPLAY_LINKS

Referenced by CdInsertNameLink(), FatInsertName(), FixupChildLinks(), FsRtlAddToTunnelCache(), RtlInsertElementGenericTableFull(), RtlInsertUnicodePrefix(), and SwapSplayLinks().

#define RtlInterlockedAndBits (   Flags,
  Flag 
)    InterlockedAnd((PLONG)(Flags), Flag)

Definition at line 3439 of file rtlfuncs.h.

#define RtlInterlockedAndBitsDiscardReturn (   Flags,
  Flag 
)    (VOID) RtlInterlockedAndBits(Flags, Flag)

Definition at line 3451 of file rtlfuncs.h.

#define RtlInterlockedClearBits (   Flags,
  Flag 
)    RtlInterlockedAndBits(Flags, ~(Flag))

Definition at line 3442 of file rtlfuncs.h.

Referenced by MiDereferenceSession().

#define RtlInterlockedClearBitsDiscardReturn (   Flags,
  Flag 
)    RtlInterlockedAndBitsDiscardReturn(Flags, ~(Flag))

Definition at line 3454 of file rtlfuncs.h.

#define RtlInterlockedSetBits (   Flags,
  Flag 
)    InterlockedOr((PLONG)(Flags), Flag)

Definition at line 3436 of file rtlfuncs.h.

Referenced by NtSetInformationToken().

#define RtlInterlockedSetBitsDiscardReturn (   Flags,
  Flag 
)    (VOID) RtlInterlockedSetBits(Flags, Flag)

Definition at line 3448 of file rtlfuncs.h.

#define RtlInterlockedXorBits (   Flags,
  Flag 
)    InterlockedXor(Flags, Flag)

Definition at line 3445 of file rtlfuncs.h.

#define RtlIntPtrToUnicodeString (   Value,
  Base,
  String 
)    RtlIntegerToUnicodeString(Value, Base, String)

Definition at line 745 of file rtlfuncs.h.

#define RtlIsNtDdiVersionAvailable   WdmlibRtlIsNtDdiVersionAvailable

Definition at line 3429 of file rtlfuncs.h.

Referenced by _Function_class_(), and AddDevice().

#define RtlIsRightChild (   Links)    (RtlRightChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
#define RtlIsServicePackVersionInstalled   WdmlibRtlIsServicePackVersionInstalled

Definition at line 3433 of file rtlfuncs.h.

#define RtlIsZeroLuid (   _L1)    ((BOOLEAN) ((!(_L1)->LowPart) && (!(_L1)->HighPart)))

Definition at line 753 of file rtlfuncs.h.

#define RtlLargeIntegerAnd (   Result,
  Source,
  Mask 
)    Result.QuadPart = Source.QuadPart & Mask.QuadPart

Definition at line 3101 of file rtlfuncs.h.

#define RtlLargeIntegerEqualTo (   X,
  Y 
)    (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))

Definition at line 3122 of file rtlfuncs.h.

#define RtlLargeIntegerEqualToZero (   X)    ( !((X).LowPart | (X).HighPart) )

Definition at line 3188 of file rtlfuncs.h.

#define RtlLargeIntegerGreaterOrEqualToZero (   X)    ( (X).HighPart >= 0 )

Definition at line 3186 of file rtlfuncs.h.

#define RtlLargeIntegerGreaterThan (   X,
  Y 
)
Value:
( \
(((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
((X).HighPart > (Y).HighPart) \
)
#define Y(i)
Definition: t_vb_render.c:49
#define X(b, s)

Definition at line 3157 of file rtlfuncs.h.

#define RtlLargeIntegerGreaterThanOrEqualTo (   X,
  Y 
)
Value:
( \
(((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
((X).HighPart > (Y).HighPart) \
)
#define Y(i)
Definition: t_vb_render.c:49
#define X(b, s)

Definition at line 3162 of file rtlfuncs.h.

#define RtlLargeIntegerGreaterThanZero (   X)
Value:
( \
(((X).HighPart == 0) && ((X).LowPart > 0)) || \
((X).HighPart > 0 ) \
)
#define X(b, s)

Definition at line 3181 of file rtlfuncs.h.

#define RtlLargeIntegerLessOrEqualToZero (   X)    ( ((X).HighPart < 0) || !((X).LowPart | (X).HighPart) )

Definition at line 3194 of file rtlfuncs.h.

#define RtlLargeIntegerLessThan (   X,
  Y 
)
Value:
( \
(((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
((X).HighPart < (Y).HighPart) \
)
#define Y(i)
Definition: t_vb_render.c:49
#define X(b, s)

Definition at line 3171 of file rtlfuncs.h.

#define RtlLargeIntegerLessThanOrEqualTo (   X,
  Y 
)
Value:
( \
(((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
((X).HighPart < (Y).HighPart) \
)
#define Y(i)
Definition: t_vb_render.c:49
#define X(b, s)

Definition at line 3176 of file rtlfuncs.h.

#define RtlLargeIntegerLessThanZero (   X)    ( ((X).HighPart < 0) )

Definition at line 3192 of file rtlfuncs.h.

#define RtlLargeIntegerNotEqualTo (   X,
  Y 
)
Value:
( \
(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)) \
)
#define Y(i)
Definition: t_vb_render.c:49
#define X(b, s)

Definition at line 3167 of file rtlfuncs.h.

#define RtlLargeIntegerNotEqualToZero (   X)    ( ((X).LowPart | (X).HighPart) )

Definition at line 3190 of file rtlfuncs.h.

#define RtlMoveMemory (   Destination,
  Source,
  Length 
)    memmove(Destination, Source, Length)

Definition at line 362 of file rtlfuncs.h.

#define RtlOemStringToCountedUnicodeSize (   STRING)
Value:
( \
)
#define UNICODE_NULL
std::wstring STRING
Definition: fontsub.cpp:33
#define RtlOemStringToUnicodeSize(STRING)
unsigned int ULONG
Definition: retypes.h:1

Referenced by Ext2OEMToUnicodeSize(), FatSetFcbNames(), FFSv1ScanDir(), FFSv2ScanDir(), FsRtlNotifyFilterReportChange(), RfsdOEMToUnicodeSize(), and RtlOemStringToCountedUnicodeString().

#define RtlOemStringToUnicodeSize (   STRING)
Value:
( \
)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG
__wchar_t WCHAR
Definition: xmlstorage.h:180
NTSYSAPI ULONG NTAPI RtlxOemStringToUnicodeSize(IN PCOEM_STRING OemString)
Definition: unicode.c:2110
#define ANSI_NULL
std::wstring STRING
Definition: fontsub.cpp:33
VOID UINTN Length
Definition: acefiex.h:744
#define RtlOffsetToPointer (   B,
  O 
)    ((PCHAR)(((PCHAR)(B)) + ((ULONG_PTR)(O))))
#define RtlPointerToOffset (   B,
  P 
)    ((ULONG)(((PCHAR)(P)) - ((PCHAR)(B))))
#define RtlRetrieveUlong (   DestAddress,
  SrcAddress 
)
Value:
if ((ULONG_PTR)(SrcAddress) & LONG_MASK) \
{ \
((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
} \
{ \
*((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
}
unsigned char * PUCHAR
Definition: retypes.h:3
uint32_t ULONG_PTR
Definition: typedefs.h:64
#define LONG_MASK
Definition: rtlfuncs.h:791
unsigned int * PULONG
Definition: retypes.h:1
else
Definition: s_aatritemp.h:84

Definition at line 909 of file rtlfuncs.h.

#define RtlRetrieveUshort (   DestAddress,
  SrcAddress 
)
Value:
if ((ULONG_PTR)(SrcAddress) & LONG_MASK) \
{ \
((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
} \
{ \
*((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
}
unsigned char * PUCHAR
Definition: retypes.h:3
uint32_t ULONG_PTR
Definition: typedefs.h:64
unsigned short * PUSHORT
Definition: retypes.h:2
#define LONG_MASK
Definition: rtlfuncs.h:791
else
Definition: s_aatritemp.h:84

Definition at line 898 of file rtlfuncs.h.

#define RtlStoreUlong (   Address,
  Value 
)
Value:
} \
else { \
*((PULONG)(Address)) = (ULONG) (Value); \
}
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
PVOID ULONG Address
Definition: oprghdlr.h:14
unsigned char * PUCHAR
Definition: retypes.h:3
#define FIRSTBYTE(VALUE)
Definition: rtlfuncs.h:795
uint32_t ULONG_PTR
Definition: typedefs.h:64
unsigned char UCHAR
Definition: xmlstorage.h:181
#define LONG_LEAST_SIGNIFICANT_BIT
Definition: rtltypes.h:217
#define LONG_3RD_MOST_SIGNIFICANT_BIT
Definition: rtltypes.h:218
#define LONG_2ND_MOST_SIGNIFICANT_BIT
Definition: rtltypes.h:219
UINTN UINT8 Value
Definition: acefiex.h:751
#define LONG_MASK
Definition: rtlfuncs.h:791
unsigned int * PULONG
Definition: retypes.h:1
#define FOURTHBYTE(VALUE)
Definition: rtlfuncs.h:798
unsigned int ULONG
Definition: retypes.h:1
else
Definition: s_aatritemp.h:84
#define THIRDBYTE(VALUE)
Definition: rtlfuncs.h:797
#define LONG_MOST_SIGNIFICANT_BIT
Definition: rtltypes.h:220
#define SECONDBYTE(VALUE)
Definition: rtlfuncs.h:796

Definition at line 868 of file rtlfuncs.h.

#define RtlStoreUlonglong (   Address,
  Value 
)
Value:
(ULONGLONG)(Value) & 0xFFFFFFFF); \
(ULONGLONG)(Value) >> 32); \
} else { \
}
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
PVOID ULONG Address
Definition: oprghdlr.h:14
#define RtlStoreUlong(Address, Value)
Definition: rtlfuncs.h:868
uint32_t ULONG_PTR
Definition: typedefs.h:64
uint64_t ULONGLONG
Definition: typedefs.h:66
#define LONGLONG_MASK
Definition: rtlfuncs.h:792
UINTN UINT8 Value
Definition: acefiex.h:751
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
Definition: ntbasedef.h:382
unsigned int ULONG
Definition: retypes.h:1

Definition at line 879 of file rtlfuncs.h.

#define RtlStoreUlongPtr (   Address,
  Value 
)    RtlStoreUlong(Address,Value)

Definition at line 932 of file rtlfuncs.h.

#define RtlStoreUshort (   Address,
  Value 
)
Value:
} \
else { \
*((PUSHORT) (Address)) = (USHORT)Value; \
}
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
PVOID ULONG Address
Definition: oprghdlr.h:14
#define SHORT_MOST_SIGNIFICANT_BIT
Definition: rtltypes.h:215
unsigned char * PUCHAR
Definition: retypes.h:3
#define FIRSTBYTE(VALUE)
Definition: rtlfuncs.h:795
#define SHORT_MASK
Definition: rtlfuncs.h:788
uint32_t ULONG_PTR
Definition: typedefs.h:64
unsigned short * PUSHORT
Definition: retypes.h:2
unsigned char UCHAR
Definition: xmlstorage.h:181
UINTN UINT8 Value
Definition: acefiex.h:751
#define SHORT_LEAST_SIGNIFICANT_BIT
Definition: rtltypes.h:214
unsigned short USHORT
Definition: pedump.c:61
else
Definition: s_aatritemp.h:84
#define SECONDBYTE(VALUE)
Definition: rtlfuncs.h:796

Definition at line 889 of file rtlfuncs.h.

#define RtlUlongByteSwap (   _x)    _byteswap_ulong((_x))

Definition at line 3200 of file rtlfuncs.h.

#define RtlUlonglongByteSwap (   _x)    _byteswap_uint64((_x))

Definition at line 3201 of file rtlfuncs.h.

Referenced by MountHDD().

#define RtlUnicodeStringToAnsiSize (   String)
Value:
( \
)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
BOOLEAN NLS_MB_CODE_PAGE_TAG
__wchar_t WCHAR
Definition: xmlstorage.h:180
NTSYSAPI ULONG NTAPI RtlxUnicodeStringToAnsiSize(IN PCUNICODE_STRING UnicodeString)
Definition: unicode.c:2163
CHAR16 * String
Definition: acefiex.h:201
#define UNICODE_NULL
VOID UINTN Length
Definition: acefiex.h:744

Definition at line 1006 of file rtlfuncs.h.

#define RtlUnicodeStringToOemSize (   STRING)
Value:
)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define UNICODE_NULL
std::wstring STRING
Definition: fontsub.cpp:33
VOID UINTN Length
Definition: acefiex.h:744
NTSYSAPI ULONG NTAPI RtlxUnicodeStringToOemSize(IN PCUNICODE_STRING UnicodeString)
Definition: unicode.c:1080
#define RtlUshortByteSwap (   _x)    _byteswap_ushort((USHORT)(_x))

Definition at line 3199 of file rtlfuncs.h.

Referenced by MountHDD(), parse_manifest(), PROFILE_ByteSwapShortBuffer(), and SwapPword().

#define RtlZeroBytes   RtlZeroMemory

Definition at line 383 of file rtlfuncs.h.

Referenced by START_TEST().

#define RtlZeroMemory (   Destination,
  Length 
)    memset(Destination, 0, Length)

Definition at line 380 of file rtlfuncs.h.

#define SECONDBYTE (   VALUE)    (((VALUE) >> 8) & LOWBYTE_MASK)

Definition at line 796 of file rtlfuncs.h.

#define SHORT_MASK   (SHORT_SIZE - 1)

Definition at line 788 of file rtlfuncs.h.

#define SHORT_SIZE   (sizeof(USHORT))

Definition at line 787 of file rtlfuncs.h.

#define THIRDBYTE (   VALUE)    (((VALUE) >> 16) & LOWBYTE_MASK)

Definition at line 797 of file rtlfuncs.h.

Function Documentation

$endif ( _WDMDDK_  )

Definition at line 3457 of file rtlfuncs.h.

3477  { \
3478  PRTL_SPLAY_LINKS _SplayLinks; \
3479  _SplayLinks = (PRTL_SPLAY_LINKS)(Links); \
3480  _SplayLinks->Parent = _SplayLinks; \
3481  _SplayLinks->LeftChild = NULL; \
3482  _SplayLinks->RightChild = NULL; \
3483 }
3484 
3485 #define RtlIsLeftChild(Links) \
3486  (RtlLeftChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
3487 
3488 #define RtlIsRightChild(Links) \
3489  (RtlRightChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
3490 
3491 #define RtlRightChild(Links) \
3492  ((PRTL_SPLAY_LINKS)(Links))->RightChild
3493 
3494 #define RtlIsRoot(Links) \
3495  (RtlParent(Links) == (PRTL_SPLAY_LINKS)(Links))
3496 
3497 #define RtlLeftChild(Links) \
3498  ((PRTL_SPLAY_LINKS)(Links))->LeftChild
3499 
3500 #define RtlParent(Links) \
3501  ((PRTL_SPLAY_LINKS)(Links))->Parent
3502 
3503 #define RtlInsertAsLeftChild(ParentLinks,ChildLinks) \
3504  { \
3505  PRTL_SPLAY_LINKS _SplayParent; \
3506  PRTL_SPLAY_LINKS _SplayChild; \
3507  _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
3508  _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
3509  _SplayParent->LeftChild = _SplayChild; \
3510  _SplayChild->Parent = _SplayParent; \
3511  }
3512 
3513 #define RtlInsertAsRightChild(ParentLinks,ChildLinks) \
3514  { \
3515  PRTL_SPLAY_LINKS _SplayParent; \
3516  PRTL_SPLAY_LINKS _SplayChild; \
3517  _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
3518  _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
3519  _SplayParent->RightChild = _SplayChild; \
3520  _SplayChild->Parent = _SplayParent; \
3521  }
3522 
3523 #if !defined(MIDL_PASS)
3524 
3526 LUID
3528 RtlConvertLongToLuid(
3529  _In_ LONG Val)
3530 {
3531  LUID Luid;
3532  LARGE_INTEGER Temp;
3533 
3534  Temp.QuadPart = Val;
3535  Luid.LowPart = Temp.u.LowPart;
3536  Luid.HighPart = Temp.u.HighPart;
3537  return Luid;
3538 }
struct _LARGE_INTEGER::@2052 u
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:513
#define FORCEINLINE
Definition: ntbasedef.h:213
DWORD LowPart
#define NTAPI_INLINE
Definition: umtypes.h:68
LONG HighPart
#define _In_
Definition: no_sal2.h:204
struct _RTL_SPLAY_LINKS * PRTL_SPLAY_LINKS
LONGLONG QuadPart
Definition: typedefs.h:113
$endif ( _NTDDK_  )

Definition at line 2487 of file iofuncs.h.

2495 {
2496  PriorityInfo->Size = sizeof(IO_PRIORITY_INFO);
2497  PriorityInfo->ThreadPriority = 0xffff;
2498  PriorityInfo->IoPriority = IoPriorityNormal;
2499  PriorityInfo->PagePriority = 0;
2500 }
struct _IO_PRIORITY_INFO IO_PRIORITY_INFO
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD _Inout_ PIO_PRIORITY_INFO PriorityInfo
Definition: fltkernel.h:2653
$endif ( _NTIFS_  )

Definition at line 2827 of file rtlfuncs.h.

2841 {
2843  ret.QuadPart = SignedInteger;
2844  return ret;
2845 }
return ret
Definition: rtlfuncs.h:3092
LONGLONG QuadPart
Definition: typedefs.h:113
$if ( _WDMDDK_  )

Kernel definitions for AMD64

Kernel definitions for ARM

Definition at line 5 of file rtlfuncs.h.

30 {
31  __fastfail(Code);
32 }
#define Code
Definition: deflate.h:80
__drv_allocatesMem ( Mem  )

Definition at line 1197 of file exfuncs.h.

1204 {
1205  PVOID Entry;
1206 
1207  Lookaside->L.TotalAllocates += 1;
1208 #ifdef NONAMELESSUNION
1209  Entry = InterlockedPopEntrySList(&Lookaside->L.u.ListHead);
1210  if (Entry == NULL) {
1211  Lookaside->L.u2.AllocateMisses += 1;
1212  Entry = (Lookaside->L.u4.AllocateEx)(Lookaside->L.Type,
1213  Lookaside->L.Size,
1214  Lookaside->L.Tag,
1215  Lookaside);
1216  }
1217 #else /* NONAMELESSUNION */
1218  Entry = InterlockedPopEntrySList(&Lookaside->L.ListHead);
1219  if (Entry == NULL) {
1220  Lookaside->L.AllocateMisses += 1;
1221  Entry = (Lookaside->L.AllocateEx)(Lookaside->L.Type,
1222  Lookaside->L.Size,
1223  Lookaside->L.Tag,
1224  Lookaside);
1225  }
1226 #endif /* NONAMELESSUNION */
1227  return Entry;
1228 }
DWORD *typedef PVOID
Definition: winlogon.h:52
_In_ PVOID Entry
Definition: exfuncs.h:229
PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER ListHead)
Definition: interlocked.c:55
smooth NULL
Definition: ftsmooth.c:513
_Inout_ PVOID Lookaside
Definition: fltkernel.h:2532
_Out_ _At_ ( GuidString->  Buffer,
__drv_allocatesMem(Mem)   
)
_Out_ _At_ ( DestinationString->  Buffer,
__drv_allocatesMem(Mem)   
)
_At_ ( BitMapHeader->  SizeOfBitMap,
_Post_equal_to_(SizeOfBitMap)   
) -> Buffer, _Post_equal_to_(BitMapBuffer)) NTSYSAPI VOID NTAPI RtlInitializeBitMap(_Out_ PRTL_BITMAP BitMapHeader, _In_opt_ __drv_aliasesMem PULONG BitMapBuffer, _In_opt_ ULONG SizeOfBitMap)

Definition at line 2954 of file rtlfuncs.h.

2963 {
2964  AnsiString->Length = 0;
2965  AnsiString->MaximumLength = BufferSize;
2966  AnsiString->Buffer = Buffer;
2967 }
_Notnull_ __drv_aliasesMem PWSTR Buffer
Definition: rtlfuncs.h:2978
_Notnull_ __drv_aliasesMem PWSTR _In_ USHORT BufferSize
Definition: rtlfuncs.h:2980
_In_range_ ( <, BitMapHeader->  SizeOfBitMap)
_In_ ULONG _In_ ULONG _In_range_ ( )
_In_ ULONG _In_range_ ( >=  ,
(UncompressedBufferSize-(UncompressedBufferSize/16))   
)
_In_ SIZE_T _In_reads_ ( String2Length  )
_In_reads_bytes_ ( BytesInUnicodeString  )
_In_ ULONG _In_ ULONG _In_reads_bytes_ ( AceListLength  )
_In_ ULONG _In_reads_bytes_ ( CompressedBufferSize  )
_In_ ULONG _In_ ULONG _In_reads_bytes_ ( CompressedTailSize  )
_In_ PCWSTR _In_z_ PCWSTR _In_ ULONG _In_reads_bytes_opt_ ( ValueLength  )
_In_ ULONG _Inout_updates_bytes_ ( CompressedDataInfoLength  )
_IRQL_requires_max_ ( PASSIVE_LEVEL  ) -> Buffer, __drv_freesMem(Mem)) PUNICODE_STRING UnicodeString)

Definition at line 37 of file Messaging.c.

48 {
49  PFLT_SERVER_PORT_OBJECT PortObject;
51 
52  /* The caller must allow at least one connection */
53  if (MaxConnections == 0)
54  {
56  }
57 
58  /* The request must be for a kernel handle */
59  if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
60  {
62  }
63 
64  /*
65  * Get rundown protection on the target to stop the owner
66  * from unloading whilst this port object is open. It gets
67  * removed in the FltpServerPortClose callback
68  */
69  Status = FltObjectReference(Filter);
70  if (!NT_SUCCESS(Status))
71  {
72  return Status;
73  }
74 
75  /* Create our new server port object */
76  Status = ObCreateObject(0,
79  KernelMode,
80  NULL,
81  sizeof(FLT_SERVER_PORT_OBJECT),
82  0,
83  0,
84  (PVOID *)&PortObject);
85  if (NT_SUCCESS(Status))
86  {
87  /* Zero out the struct */
88  RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
89 
90  /* Increment the ref count on the target filter */
92 
93  /* Setup the filter port object */
94  PortObject->Filter = Filter;
98  PortObject->Cookie = ServerPortCookie;
99  PortObject->MaxConnections = MaxConnections;
100 
101  /* Insert the object */
102  Status = ObInsertObject(PortObject,
103  NULL,
105  0,
106  NULL,
108  if (NT_SUCCESS(Status))
109  {
110  /* Lock the connection list */
112 
113  /* Add the new port object to the connection list and increment the count */
116 
117  /* Unlock the connection list*/
119  }
120  }
121 
122  if (!NT_SUCCESS(Status))
123  {
124  /* Allow the filter to be cleaned up */
126  }
127 
128  return STATUS_NOT_IMPLEMENTED;
129 }
DWORD *typedef PVOID
Definition: winlogon.h:52
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _Outptr_ PFLT_PORT * ServerPort
Definition: fltkernel.h:1873
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:177
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
#define InsertTailList(ListHead, Entry)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:252
LIST_ENTRY mList
Definition: fltmgrint.h:56
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
#define FILE_READ_DATA
Definition: nt_native.h:628
smooth NULL
Definition: ftsmooth.c:513
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:938
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:23
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1873
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:411
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1873
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: cmd.c:149
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2925
LONG NTSTATUS
Definition: DriverTester.h:11
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1873
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:179
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY _In_ LONG MaxConnections
Definition: fltkernel.h:1873
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:178
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback
Definition: fltkernel.h:1873
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:86
_IRQL_requires_max_ ( APC_LEVEL  )
_Out_range_ ( )
pure virtual
_Out_writes_bytes_ ( DestinationSidLength  )
_In_ ULONG _Out_writes_bytes_ ( CompressedBufferSize  )
_Out_writes_bytes_to_ ( MaxBytesInUnicodeString  ,
BytesInUnicodeString 
)
_Out_writes_bytes_to_ ( MaxBytesInCustomCPString  ,
BytesInCustomCPString 
)
_Out_writes_bytes_to_ ( UncompressedBufferSize  ,
FinalUncompressedSize 
)
_Out_writes_bytes_to_ ( UncompressedFragmentSize  ,
FinalUncompressedSize 
)
_Post_satisfies_ ( return >=8 &&return<=  SECURITY_MAX_SID_SIZE)
_Ret_range_ ( )
_Success_ ( return!  = -1)

Definition at line 279 of file mapping.c.

289 {
291  PENGSECTION pSection;
292 
293  /* Check parameter */
294  if (cjSize == 0) return NULL;
295 
296  /* Allocate a section object */
297  pSection = EngCreateSectionHack(fl, cjSize, ulTag);
298  if (!pSection)
299  {
300  *ppvSection = NULL;
301  return NULL;
302  }
303 
304  /* Map the section in session space */
305  Status = MmMapViewInSessionSpace(pSection->pvSectionObject,
306  &pSection->pvMappedBase,
307  &pSection->cjViewSize);
308  if (!NT_SUCCESS(Status))
309  {
310  DPRINT1("Failed to map a section Status=0x%x\n", Status);
311  *ppvSection = NULL;
312  EngFreeSectionMem(pSection, NULL);
313  return NULL;
314  }
315 
316  if (fl & FL_ZERO_MEMORY)
317  {
318  RtlZeroMemory(pSection->pvMappedBase, cjSize);
319  }
320 
321  /* Set section pointer and return base address */
322  *ppvSection = pSection;
323  return pSection->pvMappedBase;
324 }
PVOID pvSectionObject
Definition: mapping.h:4
_In_ FLONG fl
Definition: winddi.h:1279
smooth NULL
Definition: ftsmooth.c:513
BOOL APIENTRY EngFreeSectionMem(_In_opt_ PVOID pvSection, _In_opt_ PVOID pvMappedBase)
Definition: mapping.c:246
SIZE_T cjViewSize
Definition: mapping.h:6
PVOID NTAPI EngCreateSectionHack(_In_ ULONG fl, _In_ SIZE_T cjSize, _In_ ULONG ulTag)
Definition: mapping.c:132
#define FL_ZERO_MEMORY
Definition: polytest.cpp:58
Status
Definition: gdiplustypes.h:24
_In_ ULONG _In_ ULONG ulTag
Definition: winddi.h:3941
#define NT_SUCCESS(StatCode)
Definition: cmd.c:149
LONG NTSTATUS
Definition: DriverTester.h:11
#define DPRINT1
Definition: precomp.h:8
_In_ ULONG cjSize
Definition: winddi.h:3634
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
NTSTATUS NTAPI MmMapViewInSessionSpace(IN PVOID Section, OUT PVOID *MappedBase, IN OUT PSIZE_T ViewSize)
Definition: section.c:2989
PVOID pvMappedBase
Definition: mapping.h:5
_When_ ( Status< 0, _Out_range_(>  ,
 
)
pure virtual
FORCEINLINE VOID AppendTailList ( _Inout_ PLIST_ENTRY  ListHead,
_Inout_ PLIST_ENTRY  ListToAppend 
)

Definition at line 222 of file rtlfuncs.h.

225 {
226  PLIST_ENTRY ListEnd = ListHead->Blink;
227 
228 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS)
229  RtlpCheckListEntry(ListHead);
230  RtlpCheckListEntry(ListToAppend);
231 #endif
232  ListHead->Blink->Flink = ListToAppend;
233  ListHead->Blink = ListToAppend->Blink;
234  ListToAppend->Blink->Flink = ListHead;
235  ListToAppend->Blink = ListEnd;
236 }
FORCEINLINE VOID RtlpCheckListEntry(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:95
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY ListEnd
Definition: exfuncs.h:1015
Definition: typedefs.h:118
FORCEINLINE VOID FatalListEntryError ( _In_ PVOID  P1,
_In_ PVOID  P2,
_In_ PVOID  P3 
)

Definition at line 81 of file rtlfuncs.h.

Referenced by InsertHeadList(), InsertTailList(), RemoveEntryList(), RemoveHeadList(), RemoveTailList(), and RtlpCheckListEntry().

85 {
89 
90  RtlFailFast(FAST_FAIL_CORRUPT_LIST_ENTRY);
91 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:315
#define FAST_FAIL_CORRUPT_LIST_ENTRY
FORCEINLINE VOID InitializeListHead ( _Out_ PLIST_ENTRY  ListHead)

Definition at line 48 of file rtlfuncs.h.

50 {
51  ListHead->Flink = ListHead->Blink = ListHead;
52 }
FORCEINLINE VOID InitializeSListHead ( _Out_ PSLIST_HEADER  SListHead)

Definition at line 3353 of file rtlfuncs.h.

Referenced by ExInitializeSystemLookasideList(), ExInitPoolLookasidePointers(), InitializePnPManager(), InitializeTransferPackets(), MiInitializeNonPagedPool(), MmArmInitSystem(), START_TEST(), and test_slist().

3355 {
3356 #if defined(_WIN64)
3357  if (((ULONG_PTR)SListHead & 0xf) != 0) {
3359  }
3360 #if defined(_IA64_)
3361  SListHead->Region = (ULONG_PTR)SListHead & VRN_MASK;
3362 #else
3363  SListHead->Region = 0;
3364 #endif /* _IA64_ */
3365 #endif /* _WIN64 */
3366  SListHead->Alignment = 0;
3367 }
#define ExRaiseStatus
Definition: ntoskrnl.h:94
uint32_t ULONG_PTR
Definition: typedefs.h:64
#define STATUS_DATATYPE_MISALIGNMENT
Definition: ntstatus.h:171
#define ULONG_PTR
Definition: config.h:101
FORCEINLINE VOID InsertHeadList ( _Inout_ PLIST_ENTRY  ListHead,
_Inout_ __drv_aliasesMem PLIST_ENTRY  Entry 
)

Definition at line 201 of file rtlfuncs.h.

Referenced by _Function_class_(), add_children_to_move_list(), add_delete_inode_extref(), add_device_to_list(), add_ext_holes(), add_extent(), add_extent_to_fcb(), add_orphan(), add_partial_stripe(), add_pending_rmdir(), add_space_entry(), add_volume_device(), AddDialogListEntry(), AddInputEvents(), AddKnownDriverToList(), AfdConnectedSocketReadData(), AfdPacketSocketReadData(), alloc_chunk(), ApphelpCacheLookupEntry(), ApphelpCacheUpdateEntry(), BlpFileRegisterFileSystem(), CacheInternalOptimizeBlockList(), CcPurgeCacheSection(), CcRosCreateVacb(), CcRosDeleteFileCache(), CcRosTrimCache(), CdInitializeVcb(), CmpAddDriverToList(), CmpAddToDelayedClose(), CmpDoSort(), CmpInitializeHive(), co_IntSendMessageWithCallBack(), commit_batch_list_root(), ConDrvCreateScreenBuffer(), ConSrvAllocateConsole(), ConSrvInheritConsole(), create_stream(), CreateUmaDescriptor(), CSR_API(), CsrAllocateNtSession(), CsrExecServerThread(), CsrInsertThread(), divide_ext(), do_write_file_prealloc(), EngLoadImageEx(), excise_extents(), ExInitializeSystemLookasideList(), ExInterlockedInsertHeadList(), Ext2LinkHeadMcb(), Ext2PurgeVolume(), Ext2QueryUnusedBH(), Ext2QueryUnusedFcb(), Ext2ReleaseFcb(), FatCreateDcb(), FsRegisterDevice(), FsRtlFreeTunnelNode(), FsRtlInsertPerFileObjectContext(), FsRtlInsertPerStreamContext(), ftGdiGlyphCacheGet(), ftGdiGlyphCacheSet(), GdiPoolAllocate(), GdiPoolFree(), HalpAllocPhysicalMemory(), handle_batch_collision(), HistoryCurrentBuffer(), IniAddSection(), insert_dir_child_into_hash_lists(), insert_tree_item(), insert_tree_item_batch(), InsertComSpecInfo(), InsertJobIntoStartList(), IntVideoPortMapMemory(), IoFreeMapRegisters(), IopInitializeBootDrivers(), IopQueueIrpToThread(), IopQueueTargetDeviceEvent(), IoRegisterFileSystem(), IoRegisterPlugPlayNotification(), IoWriteErrorLogEntry(), IssueUniqueIdChangeNotify(), KeInsertQueueDpc(), KeStartProfile(), KiDeferredReadyThread(), KiInsertQueue(), KiInsertQueueApc(), KiInsertTimerTable(), KsAddIrpToCancelableQueue(), KsMoveIrpsOnCancelableQueue(), KxQueueReadyThread(), LdrpInitializeProcess(), LibTCPGetDataFromConnectionQueue(), load_tree(), LoadNotificationDll(), LsapCreateLogonSession(), LsapHandlePortConnection(), MiInitializeNonPagedPool(), MiLoadUserSymbols(), MiProtectedPoolInsertList(), mknod(), MmCreateCacheSection(), MmInitializeRegion(), MMixerInitializeFilter(), move_across_subvols(), NtUserSetWindowsHookEx(), open_fcb_stream(), order_space_entry(), PacketSocketRecvComplete(), PinCaptureProcess(), QueryPathCompletionRoutine(), rationalize_extents(), ReceiveActivity(), RegpCopyTree(), RtlpAddVectoredHandler(), RtlpCreateUnCommittedRange(), RtlpDestroyUnCommittedRange(), RtlpDphCoalesceNodeIntoAvailable(), RtlpIoWorkerThreadProc(), send_add_dir(), SendComplete(), set_rename_information(), SmpCreateEmergencyPagingFile(), SmpSbCreateSession(), SockLoadHelperDll(), sort_data_reloc_refs(), sort_extent_refs(), sort_metadata_reloc_refs(), space_list_add2(), space_list_subtract2(), split_tree_at(), UserGetDCEx(), VDDInstallUserHook(), VfatMount(), VGADDI_AllocSavedScreenBits(), VGADDI_InitializeOffScreenMem(), WinLdrInsertDescriptor(), write_metadata_items(), write_trees(), WsNcUpdateNamespaceList(), WsNqLookupServiceNext(), and WsTcUpdateProtocolList().

204 {
205  PLIST_ENTRY OldFlink;
206 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS) && DBG
207  RtlpCheckListEntry(ListHead);
208 #endif
209  OldFlink = ListHead->Flink;
210  Entry->Flink = OldFlink;
211  Entry->Blink = ListHead;
212 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS)
213  if (OldFlink->Blink != ListHead)
214  FatalListEntryError(ListHead, OldFlink, OldFlink->Flink);
215 #endif
216  OldFlink->Blink = Entry;
217  ListHead->Flink = Entry;
218 }
FORCEINLINE VOID RtlpCheckListEntry(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:95
struct _Entry Entry
Definition: kefuncs.h:640
struct _LIST_ENTRY * Blink
Definition: typedefs.h:121
struct _LIST_ENTRY * Flink
Definition: typedefs.h:120
Definition: typedefs.h:118
FORCEINLINE VOID FatalListEntryError(_In_ PVOID P1, _In_ PVOID P2, _In_ PVOID P3)
Definition: rtlfuncs.h:81
base of all file and directory entries
Definition: entries.h:82
FORCEINLINE VOID InsertTailList ( _Inout_ PLIST_ENTRY  ListHead,
_Inout_ __drv_aliasesMem PLIST_ENTRY  Entry 
)

Definition at line 180 of file rtlfuncs.h.

183 {
184  PLIST_ENTRY OldBlink;
185 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS) && DBG
186  RtlpCheckListEntry(ListHead);
187 #endif
188  OldBlink = ListHead->Blink;
189  Entry->Flink = ListHead;
190  Entry->Blink = OldBlink;
191 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS)
192  if (OldBlink->Flink != ListHead)
193  FatalListEntryError(OldBlink->Blink, OldBlink, ListHead);
194 #endif
195  OldBlink->Flink = Entry;
196  ListHead->Blink = Entry;
197 }
FORCEINLINE VOID RtlpCheckListEntry(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:95
struct _Entry Entry
Definition: kefuncs.h:640
struct _LIST_ENTRY * Blink
Definition: typedefs.h:121
struct _LIST_ENTRY * Flink
Definition: typedefs.h:120
Definition: typedefs.h:118
FORCEINLINE VOID FatalListEntryError(_In_ PVOID P1, _In_ PVOID P2, _In_ PVOID P3)
Definition: rtlfuncs.h:81
base of all file and directory entries
Definition: entries.h:82

Definition at line 57 of file rtlfuncs.h.

Referenced by _Dispatch_type_(), _Function_class_(), AdapterGetFirst(), AdapterStop(), add_dir_child(), add_shared_block_extent_ref(), add_shared_data_extent_ref(), add_space_entry(), add_tree_block_extent_ref(), AddInputEvents(), AddrSearchFirst(), AfdAccept(), AfdCloseSocket(), AfdConnectedSocketReadData(), AfdDisconnect(), AfdEventReceiveDatagramHandler(), AfdPacketSocketReadData(), AfdWaitForListen(), allocate_cache_chunk(), balance_data_chunk(), balance_metadata_chunk(), BasepIsProcessAllowed(), BaseSrvCleanupVDMResources(), BfClearScreen(), BlMmAllocateHeap(), BlPdQueryData(), CacheInitializeDrive(), CacheInternalFindBlock(), CacheInternalFreeBlock(), CaptureAvoidPipeStarvationWorker(), CcGetFileObjectFromSectionPtrs(), CcPurgeCacheSection(), CcRosDeleteFileCache(), CcRosTrimCache(), CcUninitializeCacheMap(), CdDeleteFcb(), CdfsDestroyFCB(), CdRomTickHandler(), CenterCurrentListItem(), CheckActiveSystemPartition(), ChewWorkItem(), ClasspStartNextSweep(), ClassRemoveCScanList(), clean_space_cache(), clean_space_cache_chunk(), CleanupSidCacheMgr(), clear_batch_list(), clear_rollback(), CmGetSystemDriverList(), CmpAddToDelayedClose(), CmpAllocateDelayItem(), CmpAllocateKeyControlBlock(), CmpDestroyHiveViewList(), CmpFlushNotifiesOnKeyBodyList(), CmpFreeKeyControlBlock(), co_HOOK_CallHooks(), co_MsqDispatchOneSentMessage(), co_MsqPeekHardwareMessage(), co_MsqSendMessage(), commit_batch_list(), commit_batch_list_root(), ConDrvDeleteConsole(), ConDrvDeleteScreenBuffer(), ConDrvFlushConsoleInputBuffer(), ConDrvGetConsoleInput(), ConDrvReadConsole(), ConioDeleteScreenBuffer(), ConioProcessInputEvent(), ConioUnpause(), ConSrvCloseHandle(), ConSrvCloseHandleEntry(), ConSrvTermReadStream(), construct_extent_item(), create_snapshot(), CreatePartitionList(), CsqPeekNextIrp(), CSR_API(), CsrDereferenceNtSession(), CsrReferenceNtSession(), DbgkClearProcessDebugObject(), DbgkpDeleteObject(), DbgkpSetProcessDebugObject(), DeleteCurrentPartition(), DeleteSymbolicLinkNameFromMemory(), DelistKeyBodyFromKCB(), DequeueDeferredClientIrp(), DestroyAllTransferPackets(), DestroyDeviceInfo(), DestroyDeviceInfoSet(), DestroyGenericList(), DestroyPartitionList(), DestroyTransferPacket(), DeviceInstallThread(), DGDeliverData(), DisconnectComplete(), DisconnectTimeoutDpc(), do_rollback(), do_tree_writes(), do_write2(), DoDisconnect(), DosShutdown(), DrawGenericList(), DriverIoControl(), drop_chunk(), duplicate_extents(), EfiVmpFreeInterfaceEntry(), enable_caching(), ExInterlockedRemoveHeadList(), ExNotifyCallback(), ExpCheckDynamicThreadCount(), ExpDeleteCallback(), ExpWorkerThreadEntryPoint(), ExQueueWorkItem(), ExRegisterCallback(), Ext2bhReaperThread(), Ext2DropBH(), Ext2FcbReaperThread(), Ext2FirstUnusedMcb(), Ext2PurgeVolume(), Ext2QueryUnusedBH(), Ext2QueryUnusedFcb(), FatDeleteFcb(), FatiCommonClose(), FatRemoveClose(), fcb_load_csums(), fcbopen_main(), FDO_HandleResetCyclePort(), FFSPurgeVolume(), fill_in_hard_link_information(), find_gid(), find_item_in_tree(), find_metadata_address_in_chunk(), find_new_dup_stripes(), find_new_stripe(), finish_inode(), finish_removing_device(), flush_changed_extent(), flush_extents(), flush_fcb(), flush_refs(), flush_subvol_fcbs(), FlushReceiveQueue(), FlushSendQueue(), FlushShutdownQueue(), free_extent_refs(), free_fcb(), free_tree2(), free_trees(), free_trees_root(), free_write_data_stripes(), FreeBT_DispatchClean(), FreeLogFilterList(), FreeLogList(), FsRtlCancelNotify(), FsRtlCheckNotifyForDelete(), FsRtlEmptyFreePoolList(), FsRtlIsNotifyOnList(), FsRtlLookupPerFileObjectContext(), FsRtlLookupPerStreamContextInternal(), FsRtlNotifyCleanup(), FsRtlNotifyCompleteIrpList(), FsRtlNotifyFilterReportChange(), FsRtlPTeardownPerFileObjectContexts(), FsRtlRemovePerFileObjectContext(), FsRtlRemovePerStreamContext(), FsRtlTeardownPerStreamContexts(), GdiPoolAllocate(), GdiPoolDestroy(), GenericListHasSingleEntry(), get_superblock_size(), HalAllocateAdapterChannel(), HalpContextToBusHandler(), HandlePhysicalConnection(), has_open_children(), HasDriveLetter(), HidClass_Close(), HidClass_GetIrp(), HidClass_ReadCompleteIrp(), HistoryDeleteBuffers(), IKsFilterFactory_fnRelease(), IniCleanup(), IniFreeSection(), insert_chunk_fragmented(), InsertJobIntoStartList(), IntCleanupThreadCallbacks(), InternalUnlockCondVar(), IntGdiCleanupMemEntry(), IntGdiCleanupPrivateFontsForProcess(), IntRemoveHook(), IntSendSyncPaint(), IntSetThreadDesktop(), IntVideoPortMapMemory(), IoCancelThreadIo(), IoFreeAdapterChannel(), IoFreeIrp(), IoFreeMapRegisters(), IoGetBootDiskInformation(), IopDeviceRelationsWorker(), IopDisassociateThreadIrp(), IopGetErrorLogEntry(), IopNotifyPlugPlayNotification(), IopRemovePlugPlayEvent(), IopUnQueueIrpFromThread(), IoRegisterFsRegistrationChange(), IoReuseIrp(), IsThereAChildOpened(), IsUniqueIdPresent(), KeConnectInterrupt(), KeDetachProcess(), KeDisconnectInterrupt(), KeFlushQueueApc(), KeInsertByKeyDeviceQueue(), KePulseEvent(), KeReleaseMutant(), KeReleaseSemaphore(), KeRemoveByKeyDeviceQueue(), KeRemoveByKeyDeviceQueueIfBusy(), KeRemoveDeviceQueue(), KeRundownQueue(), KeRundownThread(), KeSetEvent(), KeSetEventBoostPriority(), KeSetProcess(), KeSignalGateBoostPriority(), KeTerminateThread(), KeTestAlertThread(), KeUnstackDetachProcess(), KiCheckAlertability(), KiCompleteTimer(), KiDeliverApc(), KiInitializeContextThread(), KiScanReadyQueues(), KiSelectReadyThread(), KiSignalTimer(), KiTimerExpiration(), KiTimerListExpire(), KsFilterFactoryGetSymbolicLink(), KsFreeObjectBag(), KspAddObjectCreateItemToList(), KspCompletePendingIrps(), KspCreateDeviceReference(), KspFreeCreateItems(), KspFreeDeviceInterfaces(), KspFreeEventList(), KspInstallBusEnumInterface(), KxRemoveTreeTimer(), KxUnwaitThread(), KxUnwaitThreadForEvent(), LanCloseProtocol(), LibTCPDequeuePacket(), LibTCPEmptyQueue(), LibTCPGetDataFromConnectionQueue(), ListenComplete(), LocalmonShutdown(), log_file_checksum_error(), LogActiveObjects(), LogfCloseAll(), look_for_roots(), LpcExitThread(), LpcpDestroyPortQueue(), LpcpFreeConMsg(), LpcpFreeToPortZone(), LpcpPrepareToWakeClient(), LpcRequestWaitReplyPort(), MemCleanup(), MiCheckVirtualAddress(), MiniLocateDevice(), MiProtectedPoolUnProtectLinks(), MiRosTrimCache(), MmGetSessionById(), MmHapHeapAllocatorExtend(), MmUnmapViewOfSegment(), mount_vol(), MountMgrAssignDriveLetters(), MountMgrCheckUnprocessedVolumes(), MountMgrCleanup(), MountMgrFreeMountedDeviceInfo(), MountMgrFreeSavedLink(), MountMgrMountedDeviceRemoval(), MountMgrNotify(), MountMgrQueryDosVolumePath(), MountMgrQueryVolumePaths(), MountMgrUnload(), move_across_subvols(), MsqCleanupMessageQueue(), MsqCleanupThreadMsgs(), MsqPeekMessage(), MsqPostMouseMove(), NBFlushPacketQueue(), NduDispatchRead(), nfs41_remove_fcb_entry(), nfs41_update_fcb_list(), NlsUninit(), NpAddDataQueueEntry(), NpCancelDataQueueIrp(), NpCheckForNotify(), NpRemoveDataQueueEntry(), NpSetClosingPipeState(), NpSetConnectedPipeState(), NpSetDisconnectedPipeState(), NtQueryInformationThread(), NtReplyPort(), NtReplyWaitReceivePortEx(), NtRequestWaitReplyPort(), ObpDeleteObject(), open_fcb(), open_fileref(), open_fileref_by_inode(), order_space_entry(), PacketSocketRecvComplete(), PacketSocketSendComplete(), PcNewRegistryKey(), PinCaptureProcess(), PinGetIrpFromReadyList(), PopFlushVolumeWorker(), PopProcessShutDownLists(), PostprocessInput(), ProcessFragment(), ProcessQueuedRequests(), ProcessSuggestedDriveLetters(), ProtocolTransferDataComplete(), PspCreateProcess(), PurgeInputBuffer(), QSI_DEF(), query_filesystems(), rationalize_extents(), read_group_mappings(), read_mappings(), ReceiveActivity(), ReceiveComplete(), regenerate_space_list(), RegisterConnection(), RegpCopyTree(), RemoveSavedLinks(), RepairList(), reset_subkeys(), RetryDisconnectCompletion(), RfsdPurgeVolume(), RpcThreadRoutine(), RtlAllocateHeap(), RtlFindRange(), RtlFreeActivationContextStack(), RtlFreeRangeList(), RtlGetFirstRange(), RtlpClearFreeListsBit(), RtlpCreateUnCommittedRange(), RtlpInsertFreeBlockHelper(), RtlpQueueIoWorkerThread(), RtlpValidateHeap(), RtlpValidateHeapSegment(), RtlSplayTreeTest(), RxCancelNotifyChangeDirectoryRequestsForFobx(), RxCancelNotifyChangeDirectoryRequestsForVNetRoot(), RxChangeBufferingState(), RxCloseAssociatedSrvOpen(), RxCompleteSrvOpenKeyAssociation(), RxCreateSrvOpen(), RxFcbTableLookupFcb(), RxFinalizeFcbTable(), RxFinalizeNetFcb(), RxFinalizeNetFobx(), RxFinalizeSrvOpen(), RxFinishSrvCallConstructionDispatcher(), RxIsOkToPurgeFcb(), RxMarkFobxOnCleanup(), RxMarkFobxOnClose(), RxpDiscardChangeBufferingStateRequests(), RxpDispatchChangeBufferingStateRequests(), RxPostOneShotTimerRequest(), RxpScavengeFobxs(), RxPurgeChangeBufferingStateRequestsForSrvOpen(), RxPurgeRelatedFobxs(), RxRemoveFirstContextFromSerializationQueue(), RxRemoveVirtualNetRootFromNetRoot(), RxResumeBlockedOperations_ALL(), RxScavengeRelatedFobxs(), RxSpinUpRequestsDispatcher(), RxTableLookupName(), RxTableLookupName_ExactLengthMatch(), RxTimerDispatch(), ScanForUnpartitionedDiskSpace(), ScrollDownPartitionList(), ScrollUpPartitionList(), ScrubRegistryRoutine(), CUSBDevice::SelectConfiguration(), SelectPartition(), SelectPartitionPage(), send_extent_data(), send_xattr(), SendComplete(), SendOnlineNotificationWorker(), set_link_information(), set_rename_information(), SetupDiCallClassInstaller(), SetupDiDestroyDriverInfoList(), SmpCreatePagingFiles(), SmpCreateSystemManagedPagingFile(), SmpCreateVolumeDescriptors(), SmpInitializeDosDevices(), SmpInitializeKnownDlls(), SmpLoadDataFromRegistry(), SmpProcessFileRenames(), sort_data_reloc_refs(), sort_extent_refs(), sort_metadata_reloc_refs(), space_list_add2(), space_list_merge(), space_list_subtract2(), SpiAllocateSrbStructures(), SpiGetNextRequestFromLun(), SpiSaveInterruptData(), START_TEST(), StartCaptureIsocTransfer(), StreamClassReleaseResources(), StreamSocketConnectComplete(), sys_arch_mbox_fetch(), sys_mbox_free(), SysAudio_Shutdown(), TCPDisconnect(), TCPSendEventHandler(), TiUnload(), trim_unalloc_space(), TrpGenerateMappingTracker(), UDFDelayedClose(), UDFReleaseVCB(), UmaMgrCleanup(), uninit(), update_changed_extent_ref(), update_chunk_caches(), update_chunk_usage(), update_chunks(), USBH_FdoQueryBusRelations(), USBH_HubCompleteQueuedPortIdleIrps(), USBH_HubCompleteQueuedPortWakeIrps(), USBPORT_CancelSplitTransfer(), USBPORT_CloseConfiguration(), USBPORT_ClosePipe(), USBPORT_DoneSplitTransfer(), USBPORT_DpcHandler(), USBPORT_EndpointHasQueuedTransfers(), USBPORT_EndpointWorker(), USBPORT_FlushAbortList(), USBPORT_FlushAllEndpoints(), USBPORT_FlushCancelList(), USBPORT_FlushClosedEndpointList(), USBPORT_FlushController(), USBPORT_FlushDoneTransfers(), USBPORT_FlushMapTransfers(), USBPORT_FlushPendingTransfers(), USBPORT_MapTransfer(), USBPORT_MiniportCompleteTransfer(), USBPORT_ResetPipe(), USBPORT_RestoreDevice(), USBPORT_RootHubEndpointWorker(), USBPORT_SplitBulkInterruptTransfer(), USBPORT_SyncResetPipeAndClearStall(), USBPORT_WorkerThreadHandler(), USBSTOR_RemoveIrp(), UserDbgAssertThreadInfo(), UserRemoveWindowProps(), vfatDestroyFCB(), VfatDismountVolume(), VfatRenameChildFCB(), VfatSetRenameInformation(), VideoPortEnumerateChildren(), VideoPortFreeCommonBuffer(), VideoPortGetCommonBuffer(), VideoPortPutDmaAdapter(), vol_get_device_number(), vol_ioctl_passthrough(), vol_read(), vol_write(), WdmAudOpenSysaudio(), WorkerThread(), WorkItemRoutine(), write_metadata_items(), write_superblocks(), write_trees(), WsAsyncThread(), WsNcRefreshFromRegistry(), WsNcUpdateNamespaceList(), WsNqDelete(), WsNqLookupServiceBegin(), WsNqLookupServiceNext(), WsTcRefreshFromRegistry(), and WsTcUpdateProtocolList().

59 {
60  return (BOOLEAN)(ListHead->Flink == ListHead);
61 }
unsigned char BOOLEAN

Definition at line 240 of file rtlfuncs.h.

Referenced by CdCreateIrpContext(), CdUnload(), ExInterlockedPopEntryList(), ExitThreadCallback(), and UserDerefObjectCo().

242 {
243  PSINGLE_LIST_ENTRY FirstEntry;
244  FirstEntry = ListHead->Next;
245  if (FirstEntry != NULL) {
246  ListHead->Next = FirstEntry->Next;
247  }
248  return FirstEntry;
249 }
Definition: ntbasedef.h:627
smooth NULL
Definition: ftsmooth.c:513
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:628

Definition at line 253 of file rtlfuncs.h.

Referenced by CdCleanupIrpContext(), ExExtendZone(), ExInitializeZone(), ExInterlockedPushEntryList(), PushEntryListWrapper(), and UserRefObjectCo().

256 {
257  Entry->Next = ListHead->Next;
258  ListHead->Next = Entry;
259 }
struct _Entry Entry
Definition: kefuncs.h:640
base of all file and directory entries
Definition: entries.h:82
FORCEINLINE BOOLEAN RemoveEntryList ( _In_ PLIST_ENTRY  Entry)

Definition at line 105 of file rtlfuncs.h.

Referenced by _Function_class_(), _RpcCloseHandle(), _Success_(), AdapterDiscoveryThread(), add_partial_stripe(), AddrFileFree(), AfdAccept(), AfdCancelHandler(), AfdConnectedSocketReadData(), AfdDisconnect(), ApphelpCacheLookupEntry(), ApphelpCacheRemoveEntryNolock(), ApphelpCacheUpdateEntry(), balance_data_chunk(), BaseSrvCleanupVDMResources(), BfLoadDeferredFontFiles(), BlHtDelete(), BlpDisplayRegisterLocale(), CacheInternalFreeBlock(), CacheInternalOptimizeBlockList(), CancelQueued(), CancelRoutine(), CcpDereferenceCache(), CcpMapData(), CcPurgeCacheSection(), CcRosCreateVacb(), CcRosDeleteFileCache(), CcRosFlushVacb(), CcRosGetVacb(), CcRosMarkDirtyVacb(), CcRosTrimCache(), CcUninitializeCacheMap(), CdDeleteVcb(), CdfsDestroyFCB(), CdfsReleaseFCB(), CdRemoveClose(), CdTeardownStructures(), ChewWorkItem(), chunk_unlock_range(), clean_space_cache_chunk(), CleanupNotifications(), CloseUserEventLog(), CmpDestroyHive(), CmpDoSort(), CmpFreeDelayItem(), CmpFreeKeyControlBlock(), CmpOrderGroup(), CmpRemoveFromDelayedClose(), CmpUnlinkHiveFromMaster(), CmUnRegisterCallback(), co_MsqDispatchOneSentMessage(), co_MsqSendMessage(), co_UserFreeWindow(), ConDrvDeleteScreenBuffer(), ConDrvGetConsoleInput(), ConioDeleteScreenBuffer(), ConnectionFree(), ConSrvRemoveConsole(), construct_extent_item(), create_subvol(), CsqRemoveIrp(), CSR_API(), CsrDereferenceNtSession(), CsrDereferenceWait(), CsrMoveSatisfiedWait(), CsrNotifyWaitBlock(), CsrRemoveProcess(), CsrRemoveThread(), DbgkClearProcessDebugObject(), DbgkpSetProcessDebugObject(), DceFreeDCE(), delete_fileref(), DeleteCurrentPartition(), DeleteSymbolicLinkNameFromMemory(), DelistKeyBodyFromKCB(), DereferenceAdapterContextWithOpenEntry(), DestroyFIBE(), DestroyHardwareTimer(), DestroyPopupWindow(), DestroyPortDriver(), DestroyTransferPacket(), DGDeliverData(), DGRemoveIRP(), DisableHardwareTimer(), do_calc(), do_rollback(), do_splits(), do_tree_writes(), DosDeleteDevice(), drop_chunk(), EfiVmpFreeInterfaceEntry(), ElfDeleteEventLogHandle(), EngUnloadImage(), ExDeleteNPagedLookasideList(), ExDeletePagedLookasideList(), ExDeleteResourceLite(), ExpDeleteTimer(), ExpTimerApcKernelRoutine(), ExRemoveHandleTable(), Ext2ReleaseFcb(), Ext2RemoveVcb(), Ext2UnlinkMcb(), ExTimerRundown(), ExUnregisterCallback(), FatDeleteFcb(), FatRemoveClose(), FatUninitializeVcb(), FFSClose(), FFSDeleteMcbNode(), FFSPurgeVolume(), FFSRefreshMcb(), FFSRemoveVcb(), finish_inode(), finish_removing_device(), FltpServerPortClose(), flush_changed_extent(), flush_fcb(), flush_refs(), found_path(), free_fcb(), free_fileref(), free_tree2(), FreeBT_DispatchClean(), FreeCacheEntry(), FreeFilterInstance(), FreeIPDR(), FreeQueueEntry(), FreeRoutine(), FreeUmaDescriptor(), FreeUserMessage(), fsctl_set_xattr(), FsRtlAddToTunnelCache(), FsRtlCancelNotify(), FsRtlDeleteTunnelCache(), FsRtlFastUnlockSingle(), FsRtlNotifyCleanup(), FsRtlRemoveNodeFromTunnel(), FsRtlRemovePerFileObjectContext(), FsRtlRemovePerStreamContext(), FsRtlUninitializeFileLock(), ftGdiGlyphCacheGet(), GdiPoolAllocate(), GdiPoolFree(), get_block_bh_mdl(), get_block_bh_pin(), got_one(), HaliRegisterBusHandler(), HalpAllocPhysicalMemory(), HalPutDmaAdapter(), HidClass_ReadCompleteIrp(), HistoryDeleteBuffer(), i8042RemoveDevice(), IntCbFreeMemory(), IntDeRegisterShellHookWindow(), IntDesktopObjectDelete(), InternalUnlockCondVar(), InternalWake(), IntFreeHook(), IntGdiLoadFontsFromMemory(), IntRemoveEvent(), IntSetThreadDesktop(), IntVideoPortUnmapMemory(), IopRemoveTimerFromTimerList(), IopUnQueueIrpFromThread(), IoUnregisterFileSystem(), IoUnregisterFsRegistrationChange(), IoUnregisterPlugPlayNotification(), IoUnregisterShutdownNotification(), IPDatagramReassemblyTimeout(), IPFreeReassemblyList(), IPUnregisterInterface(), KdbpSymRemoveCachedFile(), KeDeregisterBugCheckCallback(), KeDeregisterBugCheckReasonCallback(), KeDisconnectInterrupt(), KeFlushQueueApc(), KeReleaseMutant(), KeRemoveByKeyDeviceQueue(), KeRemoveByKeyDeviceQueueIfBusy(), KeRemoveEntryDeviceQueue(), KeRemoveQueue(), KeRemoveQueueApc(), KeRemoveQueueDpc(), KeRundownQueue(), KeRundownThread(), KeSetSystemTime(), KeSignalGateBoostPriority(), KeStopProfile(), KeTerminateThread(), KiActivateWaiterQueue(), KiAttachProcess(), KiDeliverApc(), KiInsertQueue(), KiInsertQueueApc(), KiRemoveEntryTimer(), KiRetireDpcList(), KiScanReadyQueues(), KiSelectReadyThread(), KiSetPriorityThread(), KiTimerListExpire(), KiUnlinkThread(), KmtUserModeCallback(), KsCancelRoutine(), KsFreeObjectBag(), KsMoveIrpsOnCancelableQueue(), KspDisableEvent(), KspRemoveDeviceAssociations(), KsRemoveIrpFromCancelableQueue(), KsRemoveItemFromObjectBag(), KsRemoveSpecificIrpFromCancelableQueue(), KsSetPowerDispatch(), KsSetTargetDeviceObject(), KxRemoveTreeTimer(), LanCloseProtocol(), LANUnregisterAdapter(), LdrpMapDll(), LdrUnloadDll(), load_stored_free_space_cache(), load_stored_free_space_tree(), LoadBootDeviceDriver(), LocalmonClosePort(), LocalmonShutdown(), LocalmonXcvClosePort(), LockRemoveIrp(), LogfListRemoveItem(), LookupThreadProc(), LpcExitThread(), LpcpDeletePort(), LpcpDestroyPortQueue(), LpcpFreeConMsg(), LpcpFreeDataInfoMessage(), LpcpFreeToPortZone(), LpcpPrepareToWakeClient(), LpcRequestWaitReplyPort(), LsapDeleteLogonSession(), LwipThreadMain(), MemRemoveFastMemoryHook(), MiAllocatePoolPages(), MiDereferenceSessionFinal(), MiFreePoolPages(), MiniportHalt(), MiProcessLoaderEntry(), MiProtectedPoolRemoveEntryList(), MiRosTrimCache(), MiSessionRemoveProcess(), MmAlterRegion(), MmDeleteProcessAddressSpace(), MmFinalizeSegment(), MMixerRemoveEvent(), MmMdRemoveDescriptorFromList(), MmSplitRegion(), MountMgrCancel(), MountMgrMountedDeviceRemoval(), MountMgrQueryVolumePaths(), MountMgrVolumeMountPointDeleted(), move_across_subvols(), MsfsClose(), MsfsRemoveIrp(), MsqDestroyMessage(), MupDereferenceCcb(), MupDereferenceKnownPrefix(), MupDereferenceMasterQueryContext(), MupRemoveKnownPrefixEntry(), NetrJobDel(), nfs41_remove_fcb_entry(), NpCancelDataQueueIrp(), NpCancelListeningQueueIrp(), NpCancelWaiter(), NpCancelWaitQueueIrp(), NpDeleteCcb(), NpDeleteFcb(), NpTimerDispatch(), NtCancelTimer(), NtDebugContinue(), NtfsReleaseFCB(), NtReplyPort(), NtReplyWaitReceivePortEx(), NtRequestWaitReplyPort(), NtSetTimer(), ObpDeleteObject(), ObpDestroySecurityDescriptorHeader(), PcUnregisterIoTimeout(), PdoPnpControl(), PnpRootPdoPnpControl(), PopFlushVolumes(), PopFlushVolumeWorker(), PoRemoveVolumeDevice(), PostTimerMessages(), ProcessFragment(), PspDeleteJob(), PspDeleteProcess(), PspDeleteThread(), PspDestroyQuotaBlock(), QueryPathCompletionRoutine(), rationalize_extents(), ReconcileThisDatabaseWithMasterWorker(), RedirectSavedLink(), RegpCopyTree(), remove_dir_child_from_hash_lists(), remove_from_bootstrap(), remove_volume_child(), RemoveBatteryFromList(), RemoveCachedEntry(), RemoveComSpecInfo(), RemoveConsole(), RemoveDialogListEntry(), RemoveIPDR(), RemoveSavedLinks(), RemoveTimer(), CHubController::RemoveUsbDevice(), RemoveWorkItem(), RfsdClose(), RfsdDeleteMcbNode(), RfsdPurgeVolume(), RfsdRefreshMcb(), RfsdRemoveVcb(), RtlDeleteCriticalSection(), RtlDeleteElementGenericTable(), RtlDeleteOwnersRanges(), RtlDeleteRange(), RtlFreeHeap(), RtlpAllocateNonDedicated(), RtlpCallVectoredHandlers(), RtlpDphCoalesceNodeIntoAvailable(), RtlpDphFreeDelayedBlocksFromHeap(), RtlpDphRemoveFromAvailableList(), RtlpFindAndCommitPages(), RtlpInsertUnCommittedPages(), RtlpIoWorkerThreadProc(), RtlpPageHeapDestroy(), RtlpQueueIoWorkerThread(), RtlpRemoveFreeBlock(), RtlpRemoveVectoredHandler(), RxCancelNotifyChangeDirectoryRequestsForFobx(), RxCancelNotifyChangeDirectoryRequestsForVNetRoot(), RxDereferenceAndDeleteRxContext_Real(), RxFcbTableRemoveFcb(), RxFinalizeNetFobx(), RxFinalizeSrvOpen(), RxGatherRequestsForSrvOpen(), RxLowIoCompletionTail(), RxMarkFobxOnClose(), RxpDispatchChangeBufferingStateRequests(), RxpUndoScavengerFinalizationMarking(), RxPurgeRelatedFobxs(), RxRemoveFirstContextFromSerializationQueue(), RxRemoveFromTopLevelIrpAllocatedContextsList(), RxRemovePrefixTableEntry(), RxRemoveVirtualNetRootFromNetRoot(), RxScavengeFobxsForNetRoot(), RxTimerDispatch(), ScmDeleteMarkedServices(), ScmDeleteServiceRecord(), ScmDereferenceServiceImage(), ScmSetServiceGroup(), set_rename_information(), SetupDiCreateDeviceInfoW(), SetupDiDeleteDeviceInfo(), SignalSocket(), SmpConfigureSubSystems(), SmpDeleteSession(), SmpLoadSubSystem(), SmpSaveRegistryValue(), sort_data_reloc_refs(), space_list_add2(), space_list_subtract2(), SpiSaveInterruptData(), TCPAbortListenForSocket(), TCPRemoveIRP(), TCPSleep(), try_consolidation(), try_tree_amalgamate(), UDFCleanUpCCB(), UDFCleanUpFCB(), UDFCloseAllDelayed(), UDFCloseAllXXXDelayedInDir(), UDFDelayedClose(), UDFReleaseVCB(), UDFVRemoveBlock(), UnbindAdapterByContext(), uninit(), UnlinkFontMemCollection(), CUSBQueue::UnlinkQueueHead(), update_tree_extents(), USBH_Worker(), USBPORT_CancelPendingTransferIrp(), USBPORT_CancelSplitTransfer(), USBPORT_DeleteEndpoint(), USBPORT_DmaEndpointPaused(), USBPORT_DoneSplitTransfer(), USBPORT_DpcHandler(), USBPORT_FlushPendingTransfers(), USBPORT_HandleSelectInterface(), USBPORT_QueueDoneTransfer(), USBPORT_RemoveBadRequest(), USBPORT_RemoveDeviceHandle(), USBPORT_RemoveIdleIrp(), USBPORT_RemovePipeHandle(), USBPORT_RemoveUSBxFdo(), USBPORT_RootHubEndpointWorker(), USBSTOR_Cancel(), UserGetDCEx(), UserRemoveWindowProps(), VDDDeInstallMemoryHook(), VDDDeInstallUserHook(), VDDInstallMemoryHook(), vfatDelFCBFromTable(), vfatDestroyFCB(), vfatUpdateFCB(), VGADDI_FreeSavedScreenBits(), VideoPortPutDmaAdapter(), WdmAudCleanup(), WdmAudGetMixerEvent(), wglDeleteContext(), WinLdrInsertDescriptor(), WinLdrLoadBootDrivers(), WmipClearIrpObjectList(), write_metadata_items(), WsAsyncCancelRequest(), WsNcRemoveCatalogItem(), WsNcUpdateNamespaceList(), WsNqLookupServiceBegin(), WsNqLookupServiceNext(), WsTcRemoveCatalogItem(), and WsTcUpdateProtocolList().

107 {
108  PLIST_ENTRY OldFlink;
109  PLIST_ENTRY OldBlink;
110 
111  OldFlink = Entry->Flink;
112  OldBlink = Entry->Blink;
113 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS)
114 #ifdef EXTRA_KERNEL_LIST_ENTRY_CHECKS
115  if (OldFlink == Entry || OldBlink == Entry)
116  FatalListEntryError(OldBlink, Entry, OldFlink);
117 #endif
118  if (OldFlink->Blink != Entry || OldBlink->Flink != Entry)
119  FatalListEntryError(OldBlink, Entry, OldFlink);
120 #endif
121  OldFlink->Blink = OldBlink;
122  OldBlink->Flink = OldFlink;
123  return (BOOLEAN)(OldFlink == OldBlink);
124 }
struct _LIST_ENTRY * Blink
Definition: typedefs.h:121
struct _LIST_ENTRY * Flink
Definition: typedefs.h:120
unsigned char BOOLEAN
Definition: typedefs.h:118
FORCEINLINE VOID FatalListEntryError(_In_ PVOID P1, _In_ PVOID P2, _In_ PVOID P3)
Definition: rtlfuncs.h:81
base of all file and directory entries
Definition: entries.h:82
FORCEINLINE BOOLEAN RemoveEntryListUnsafe ( _In_ PLIST_ENTRY  Entry)

Definition at line 65 of file rtlfuncs.h.

67 {
68  PLIST_ENTRY OldFlink;
69  PLIST_ENTRY OldBlink;
70 
71  OldFlink = Entry->Flink;
72  OldBlink = Entry->Blink;
73  OldFlink->Blink = OldBlink;
74  OldBlink->Flink = OldFlink;
75  return (BOOLEAN)(OldFlink == OldBlink);
76 }
struct _LIST_ENTRY * Blink
Definition: typedefs.h:121
struct _LIST_ENTRY * Flink
Definition: typedefs.h:120
unsigned char BOOLEAN
Definition: typedefs.h:118
base of all file and directory entries
Definition: entries.h:82
FORCEINLINE PLIST_ENTRY RemoveHeadList ( _Inout_ PLIST_ENTRY  ListHead)

Definition at line 128 of file rtlfuncs.h.

Referenced by _Function_class_(), AdapterStop(), AfdCloseSocket(), AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdDisconnect(), AfdEventReceiveDatagramHandler(), AfdPacketSocketReadData(), AfdPacketSocketWriteData(), balance_data_chunk(), balance_metadata_chunk(), CacheInitializeDrive(), CaptureAvoidPipeStarvationWorker(), CcPurgeCacheSection(), CcRosTrimCache(), CdFspDispatch(), ClassRemoveCScanList(), clean_space_cache(), clear_batch_list(), clear_rollback(), CmpAllocateDelayItem(), CmpAllocateKeyControlBlock(), CmpDestroyHiveViewList(), co_MsqDispatchOneSentMessage(), commit_batch_list(), commit_batch_list_root(), ConDrvFlushConsoleInputBuffer(), ConDrvReadConsole(), ConSrvTermReadStream(), DbgkClearProcessDebugObject(), DbgkpSetProcessDebugObject(), DeleteCurrentPartition(), DequeueDeferredClientIrp(), DestroyDeviceInfo(), DestroyDeviceInfoSet(), DestroyGenericList(), DestroyPartitionList(), DeviceInstallThread(), DisconnectComplete(), DisconnectTimeoutDpc(), do_tree_writes(), do_write2(), duplicate_extents(), ExInterlockedRemoveHeadList(), Ext2bhReaperThread(), Ext2DropBH(), Ext2FcbReaperThread(), Ext2FirstUnusedMcb(), Ext2PurgeVolume(), Ext2QueryUnusedBH(), Ext2QueryUnusedFcb(), FatRemoveClose(), FDO_HandleResetCyclePort(), FFSPurgeVolume(), finish_inode(), finish_removing_device(), flush_changed_extent(), flush_extents(), flush_refs(), FlushReceiveQueue(), FlushSendQueue(), FlushShutdownQueue(), free_extent_refs(), free_fcb(), free_tree2(), free_write_data_stripes(), FreeBT_DispatchClean(), FreeLogFilterList(), FreeLogList(), FsRtlEmptyFreePoolList(), FsRtlNotifyCompleteIrpList(), FsRtlTeardownPerStreamContexts(), GdiPoolAllocate(), GdiPoolDestroy(), get_superblock_size(), HidClass_Close(), HidClass_GetIrp(), HistoryDeleteBuffers(), IniCleanup(), IniFreeSection(), IntCleanupThreadCallbacks(), IntGdiCleanupMemEntry(), IntGdiCleanupPrivateFontsForProcess(), IoFreeMapRegisters(), IopDeviceRelationsWorker(), IopDisassociateThreadIrp(), IopGetErrorLogEntry(), KeRemoveDeviceQueue(), KsFreeObjectBag(), KspCompletePendingIrps(), KspFreeCreateItems(), KspFreeDeviceInterfaces(), KspFreeEventList(), LanCloseProtocol(), LibTCPDequeuePacket(), LibTCPEmptyQueue(), ListenComplete(), log_file_checksum_error(), LsapDeregisterLogonProcess(), MemCleanup(), MmUnmapViewOfSegment(), mount_vol(), MountMgrCheckUnprocessedVolumes(), MountMgrFreeMountedDeviceInfo(), MountMgrFreeSavedLink(), MountMgrMountedDeviceRemoval(), MountMgrNotify(), MountMgrUnload(), move_across_subvols(), MsfsRead(), NBFlushPacketQueue(), NduDispatchRead(), NlsUninit(), NpCheckForNotify(), NpRemoveDataQueueEntry(), NpSetClosingPipeState(), NpSetConnectedPipeState(), NpSetDisconnectedPipeState(), NtReplyWaitReceivePortEx(), open_fileref(), PacketSocketRecvComplete(), PacketSocketSendComplete(), PinCaptureProcess(), PinGetIrpFromReadyList(), PopProcessShutDownLists(), ProcessQueuedRequests(), ProtocolTransferDataComplete(), PurgeInputBuffer(), rationalize_extents(), read_group_mappings(), read_mappings(), ReceiveActivity(), ReceiveComplete(), regenerate_space_list(), reset_subkeys(), RfsdPurgeVolume(), RtlFreeRangeList(), RtlpCreateUnCommittedRange(), RxCancelNotifyChangeDirectoryRequestsForFobx(), RxCancelNotifyChangeDirectoryRequestsForVNetRoot(), RxFinishSrvCallConstructionDispatcher(), RxpScavengeFobxs(), RxPurgeRelatedFobxs(), RxRemoveOverflowEntry(), RxScavengeRelatedFobxs(), RxSpinUpRequestsDispatcher(), CUSBDevice::SelectConfiguration(), SendComplete(), SendOnlineNotificationWorker(), SetupDiCallClassInstaller(), SetupDiDestroyDriverInfoList(), SmpInitializeDosDevices(), SmpInitializeKnownDlls(), SmpLoadDataFromRegistry(), SmpProcessFileRenames(), sort_data_reloc_refs(), sort_extent_refs(), sort_metadata_reloc_refs(), split_path(), StartCaptureIsocTransfer(), StreamClassReleaseResources(), StreamSocketConnectComplete(), sys_arch_mbox_fetch(), SysAudio_Shutdown(), trim_unalloc_space(), UDFCommonDispatch(), uninit(), update_chunk_caches(), update_chunks(), USBH_FdoQueryBusRelations(), USBPORT_CloseConfiguration(), USBPORT_FlushAbortList(), USBPORT_FlushAllEndpoints(), USBPORT_FlushCancelList(), USBPORT_FlushClosedEndpointList(), USBPORT_FlushController(), USBPORT_FlushDoneTransfers(), USBPORT_FlushMapTransfers(), USBPORT_MapTransfer(), USBPORT_SplitBulkInterruptTransfer(), USBPORT_WorkerThreadHandler(), USBSTOR_RemoveIrp(), VfatDismountVolume(), WorkerThread(), WorkItemRoutine(), write_metadata_items(), write_superblocks(), write_trees(), WsAsyncThread(), WsNcRefreshFromRegistry(), WsNcUpdateNamespaceList(), WsNqDelete(), WsNqLookupServiceBegin(), WsNqLookupServiceNext(), WsTcRefreshFromRegistry(), and WsTcUpdateProtocolList().

130 {
131  PLIST_ENTRY Flink;
133 
134 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS) && DBG
135  RtlpCheckListEntry(ListHead);
136 #ifdef EXTRA_KERNEL_LIST_ENTRY_CHECKS
137  if (ListHead->Flink == ListHead || ListHead->Blink == ListHead)
138  FatalListEntryError(ListHead->Blink, ListHead, ListHead->Flink);
139 #endif
140 #endif
141  Entry = ListHead->Flink;
142  Flink = Entry->Flink;
143 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS)
144  if (Entry->Blink != ListHead || Flink->Blink != Entry)
145  FatalListEntryError(ListHead, Entry, Flink);
146 #endif
147  ListHead->Flink = Flink;
148  Flink->Blink = ListHead;
149  return Entry;
150 }
FORCEINLINE VOID RtlpCheckListEntry(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:95
struct _Entry Entry
Definition: kefuncs.h:640
struct _LIST_ENTRY * Blink
Definition: typedefs.h:121
struct _LIST_ENTRY * Flink
Definition: typedefs.h:120
Definition: typedefs.h:118
FORCEINLINE VOID FatalListEntryError(_In_ PVOID P1, _In_ PVOID P2, _In_ PVOID P3)
Definition: rtlfuncs.h:81
FORCEINLINE PLIST_ENTRY RemoveTailList ( _Inout_ PLIST_ENTRY  ListHead)

Definition at line 154 of file rtlfuncs.h.

Referenced by _Function_class_(), CcRosDeleteFileCache(), do_rollback(), IopRemovePlugPlayEvent(), log_file_checksum_error(), open_fileref(), and split_path().

156 {
157  PLIST_ENTRY Blink;
159 
160 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS) && DBG
161  RtlpCheckListEntry(ListHead);
162 #ifdef EXTRA_KERNEL_LIST_ENTRY_CHECKS
163  if (ListHead->Flink == ListHead || ListHead->Blink == ListHead)
164  FatalListEntryError(ListHead->Blink, ListHead, ListHead->Flink);
165 #endif
166 #endif
167  Entry = ListHead->Blink;
168  Blink = Entry->Blink;
169 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS)
170  if (Blink->Flink != Entry || Entry->Flink != ListHead)
171  FatalListEntryError(Blink, Entry, ListHead);
172 #endif
173  ListHead->Blink = Blink;
174  Blink->Flink = ListHead;
175  return Entry;
176 }
FORCEINLINE VOID RtlpCheckListEntry(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:95
struct _Entry Entry
Definition: kefuncs.h:640
struct _LIST_ENTRY * Blink
Definition: typedefs.h:121
struct _LIST_ENTRY * Flink
Definition: typedefs.h:120
Definition: typedefs.h:118
FORCEINLINE VOID FatalListEntryError(_In_ PVOID P1, _In_ PVOID P2, _In_ PVOID P3)
Definition: rtlfuncs.h:81
FORCEINLINE ULONG NTAPI RtlActiveEnumeratorsHashTable ( _In_ PRTL_DYNAMIC_HASH_TABLE  HashTable)

Definition at line 3644 of file rtlfuncs.h.

3646 {
3647  return HashTable->NumEnumerators;
3648 }
_Must_inspect_result_ NTSYSAPI NTSTATUS NTAPI RtlAllocateAndInitializeSid ( _In_ PSID_IDENTIFIER_AUTHORITY  IdentifierAuthority,
_In_ UCHAR  SubAuthorityCount,
_In_ ULONG  SubAuthority0,
_In_ ULONG  SubAuthority1,
_In_ ULONG  SubAuthority2,
_In_ ULONG  SubAuthority3,
_In_ ULONG  SubAuthority4,
_In_ ULONG  SubAuthority5,
_In_ ULONG  SubAuthority6,
_In_ ULONG  SubAuthority7,
_Outptr_ PSID Sid 
)
_Must_inspect_result_ NTSYSAPI BOOLEAN NTAPI RtlAreBitsSet ( _In_ PRTL_BITMAP  BitMapHeader,
_In_ ULONG  StartingIndex,
_In_ ULONG  Length 
)

Definition at line 459 of file bitmap.c.

463 {
464  /* Verify parameters */
465  if ((StartingIndex + Length > BitMapHeader->SizeOfBitMap) ||
467  return FALSE;
468 
469  return RtlpGetLengthOfRunSet(BitMapHeader, StartingIndex, Length) >= Length;
470 }
#define FALSE
Definition: types.h:117
static __inline BITMAP_INDEX RtlpGetLengthOfRunSet(_In_ PRTL_BITMAP BitMapHeader, _In_ BITMAP_INDEX StartingIndex, _In_ BITMAP_INDEX MaxLength)
Definition: bitmap.c:153
VOID UINTN Length
Definition: acefiex.h:744
_In_ ULONG StartingIndex
Definition: rtlfuncs.h:395
__analysis_noreturn NTSYSAPI VOID NTAPI RtlAssert ( _In_ PVOID  FailedAssertion,
_In_ PVOID  FileName,
_In_ ULONG  LineNumber,
_In_opt_z_ PSTR  Message 
)
NTSYSAPI VOID NTAPI RtlCaptureContext ( _Out_ PCONTEXT  ContextRecord)
NTSYSAPI USHORT NTAPI RtlCaptureStackBackTrace ( _In_ ULONG  FramesToSkip,
_In_ ULONG  FramesToCapture,
_Out_writes_to_(FramesToCapture, return) PVOID BackTrace,
_Out_opt_ PULONG  BackTraceHash 
)
NTSYSAPI VOID NTAPI RtlClearAllBits ( _In_ PRTL_BITMAP  BitMapHeader)

Definition at line 272 of file bitmap.c.

274 {
275  BITMAP_INDEX LengthInUlongs;
276 
277  LengthInUlongs = (BitMapHeader->SizeOfBitMap + _BITCOUNT - 1) / _BITCOUNT;
278  RtlFillMemoryUlong(BitMapHeader->Buffer, LengthInUlongs * sizeof(BITMAP_INDEX), 0);
279 }
#define RtlFillMemoryUlong(dst, len, val)
Definition: mkhive.h:49
ULONG BITMAP_INDEX
Definition: bitmap.c:64
#define _BITCOUNT
Definition: bitmap.c:62
NTSYSAPI VOID NTAPI RtlClearBits ( _In_ PRTL_BITMAP  BitMapHeader,
_In_range_(0, BitMapHeader->SizeOfBitMap-NumberToClear) ULONG  StartingIndex,
_In_range_(0, BitMapHeader->SizeOfBitMap-StartingIndex) ULONG  NumberToClear 
)

Definition at line 314 of file bitmap.c.

Referenced by RtlFindSetBitsAndClear().

318 {
319  BITMAP_INDEX Bits, Mask;
321 
322  ASSERT(StartingIndex + NumberToClear <= BitMapHeader->SizeOfBitMap);
323 
324  /* Calculate buffer start and first bit index */
325  Buffer = &BitMapHeader->Buffer[StartingIndex / _BITCOUNT];
326  Bits = StartingIndex & (_BITCOUNT - 1);
327 
328  /* Are we unaligned? */
329  if (Bits)
330  {
331  /* Create an inverse mask by shifting MAXINDEX */
332  Mask = MAXINDEX << Bits;
333 
334  /* This is what's left in the first ULONG */
335  Bits = _BITCOUNT - Bits;
336 
337  /* Even less bits to clear? */
338  if (NumberToClear < Bits)
339  {
340  /* Calculate how many bits are left */
341  Bits -= NumberToClear;
342 
343  /* Fixup the mask on the high side */
344  Mask = Mask << Bits >> Bits;
345 
346  /* Clear bits and return */
347  *Buffer &= ~Mask;
348  return;
349  }
350 
351  /* Clear bits */
352  *Buffer &= ~Mask;
353 
354  /* Update buffer and left bits */
355  Buffer++;
356  NumberToClear -= Bits;
357  }
358 
359  /* Clear all full ULONGs */
360  RtlFillMemoryUlong(Buffer, NumberToClear >> 3, 0);
361  Buffer += NumberToClear / _BITCOUNT;
362 
363  /* Clear what's left */
364  NumberToClear &= (_BITCOUNT - 1);
365  if (NumberToClear != 0)
366  {
367  Mask = MAXINDEX << NumberToClear;
368  *Buffer &= Mask;
369  }
370 }
#define RtlFillMemoryUlong(dst, len, val)
Definition: mkhive.h:49