48 ListHead->Flink = ListHead->Blink = ListHead;
59 OldFlink = ListHead->
Flink;
60 Entry->Flink = OldFlink;
61 Entry->Blink = ListHead;
63 ListHead->Flink =
Entry;
74 OldBlink = ListHead->
Blink;
75 Entry->Flink = ListHead;
76 Entry->Blink = OldBlink;
78 ListHead->Blink =
Entry;
88 return (
BOOLEAN)(ListHead->Flink == ListHead);
98 FirstEntry = ListHead->
Next;
99 if (FirstEntry !=
NULL) {
113 Entry->Next = ListHead->Next;
114 ListHead->Next =
Entry;
125 OldFlink =
Entry->Flink;
126 OldBlink =
Entry->Blink;
127 OldFlink->
Blink = OldBlink;
128 OldBlink->
Flink = OldFlink;
129 return (
BOOLEAN)(OldFlink == OldBlink);
140 Entry = ListHead->Flink;
141 Flink =
Entry->Flink;
142 ListHead->Flink = Flink;
143 Flink->
Blink = ListHead;
155 Entry = ListHead->Blink;
156 Blink =
Entry->Blink;
157 ListHead->Blink = Blink;
158 Blink->
Flink = ListHead;
170RtlInitEmptyUnicodeString(
185RtlInitEmptyAnsiString(
198#define RtlEqualLuid(L1, L2) (((L1)->HighPart == (L2)->HighPart) && \
199 ((L1)->LowPart == (L2)->LowPart))
231#define ASSERT( exp ) \
233 (RtlAssert( (PVOID)#exp, (PVOID)__FILE__, __LINE__, NULL ),FALSE) : \
236#define ASSERTMSG( msg, exp ) \
238 (RtlAssert( (PVOID)#exp, (PVOID)__FILE__, __LINE__, (PCHAR)msg ),FALSE) : \
243#define ASSERT( exp ) ((void) 0)
244#define ASSERTMSG( msg, exp ) ((void) 0)
249#ifdef NTOS_KERNEL_RUNTIME
255#define RTL_PAGED_CODE PAGED_CODE
262#define RTL_PAGED_CODE()
269#ifndef RTL_USE_AVL_TABLES
429#define RtlIsLeftChild(Links) \
430 (RtlLeftChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
432#define RtlIsRightChild(Links) \
433 (RtlRightChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
435#define RtlRightChild(Links) \
436 ((PRTL_SPLAY_LINKS)(Links))->RightChild
438#define RtlIsRoot(Links) \
439 (RtlParent(Links) == (PRTL_SPLAY_LINKS)(Links))
441#define RtlLeftChild(Links) \
442 ((PRTL_SPLAY_LINKS)(Links))->LeftChild
444#define RtlParent(Links) \
445 ((PRTL_SPLAY_LINKS)(Links))->Parent
449#define RtlInitializeSplayLinks(Links) \
451 PRTL_SPLAY_LINKS _SplayLinks; \
452 _SplayLinks = (PRTL_SPLAY_LINKS)(Links); \
453 _SplayLinks->Parent = _SplayLinks; \
454 _SplayLinks->LeftChild = NULL; \
455 _SplayLinks->RightChild = NULL; \
458#define RtlInsertAsLeftChild(ParentLinks,ChildLinks) \
460 PRTL_SPLAY_LINKS _SplayParent; \
461 PRTL_SPLAY_LINKS _SplayChild; \
462 _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
463 _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
464 _SplayParent->LeftChild = _SplayChild; \
465 _SplayChild->Parent = _SplayParent; \
468#define RtlInsertAsRightChild(ParentLinks,ChildLinks) \
470 PRTL_SPLAY_LINKS _SplayParent; \
471 PRTL_SPLAY_LINKS _SplayChild; \
472 _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
473 _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
474 _SplayParent->RightChild = _SplayChild; \
475 _SplayChild->Parent = _SplayParent; \
607#ifdef RTL_USE_AVL_TABLES
609#define RtlInitializeGenericTable RtlInitializeGenericTableAvl
610#define RtlInsertElementGenericTable RtlInsertElementGenericTableAvl
611#define RtlInsertElementGenericTableFull RtlInsertElementGenericTableFullAvl
612#define RtlDeleteElementGenericTable RtlDeleteElementGenericTableAvl
613#define RtlLookupElementGenericTable RtlLookupElementGenericTableAvl
614#define RtlLookupElementGenericTableFull RtlLookupElementGenericTableFullAvl
615#define RtlEnumerateGenericTable RtlEnumerateGenericTableAvl
616#define RtlEnumerateGenericTableWithoutSplaying RtlEnumerateGenericTableWithoutSplayingAvl
617#define RtlGetElementGenericTable RtlGetElementGenericTableAvl
618#define RtlNumberGenericTableElements RtlNumberGenericTableElementsAvl
619#define RtlIsGenericTableEmpty RtlIsGenericTableEmptyAvl
820#define RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT 8
844 _Inout_opt_ PKNONVOLATILE_CONTEXT_POINTERS ContextPointers
1107#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
1111#define NtCurrentPeb() (NtCurrentTeb()->ProcessEnvironmentBlock)
1562#ifdef NTOS_MODE_USER
1570 ULONG InformationLength,
1583#if (NTDDI_VERSION >= NTDDI_VISTA)
1662#ifdef NTOS_MODE_USER
1670 ULONG InformationLength,
1857#ifdef NTOS_MODE_USER
1863#pragma intrinsic(_byteswap_ushort)
1864#pragma intrinsic(_byteswap_ulong)
1865#pragma intrinsic(_byteswap_uint64)
1867#define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x))
1868#define RtlUlongByteSwap(_x) _byteswap_ulong((_x))
1869#define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
1881#ifdef NTOS_MODE_USER
1883#define RtlUnicodeStringToAnsiSize(STRING) ( \
1884 NLS_MB_CODE_PAGE_TAG ? \
1885 RtlxUnicodeStringToAnsiSize(STRING) : \
1886 ((STRING)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
1940RtlUnicodeStringToCountedOemString(
1964#ifdef NTOS_MODE_USER
1966#define RtlUnicodeStringToOemSize(STRING) ( \
1967 NLS_MB_OEM_CODE_PAGE_TAG ? \
1968 RtlxUnicodeStringToOemSize(STRING) : \
1969 ((STRING)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
1972#define RtlUnicodeStringToCountedOemSize(STRING) ( \
1973 (ULONG)(RtlUnicodeStringToOemSize(STRING) - sizeof(ANSI_NULL)) \
2052#ifdef NTOS_MODE_USER
2054#define RtlOemStringToUnicodeSize(STRING) ( \
2055 NLS_MB_OEM_CODE_PAGE_TAG ? \
2056 RtlxOemStringToUnicodeSize(STRING) : \
2057 ((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
2060#define RtlOemStringToCountedUnicodeSize(STRING) ( \
2061 (ULONG)(RtlOemStringToUnicodeSize(STRING) - sizeof(UNICODE_NULL)) \
2092#ifdef NTOS_MODE_USER
2094#define RtlAnsiStringToUnicodeSize(STRING) ( \
2095 NLS_MB_CODE_PAGE_TAG ? \
2096 RtlxAnsiStringToUnicodeSize(STRING) : \
2097 ((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
2166#ifdef NTOS_MODE_USER
2199#if defined(_M_AMD64)
2209 if ((
Length /= 4) != 0) {
2212 if ((
Length -= 1) == 0) {
2223#define RtlFillMemoryUlonglong(Destination, Length, Pattern) \
2224 __stosq((PULONG64)(Destination), Pattern, (Length) / 8)
2266#ifndef RtlEqualMemory
2267#define RtlEqualMemory(Destination, Source, Length) \
2268 (!memcmp(Destination, Source, Length))
2271#define RtlCopyBytes RtlCopyMemory
2272#define RtlFillBytes RtlFillMemory
2273#define RtlZeroBytes RtlZeroMemory
2463#define RTL_SKIP_BUFFER_COPY 0x00000001
2474#ifdef NTOS_MODE_USER
2486 Buffer->ReservedForAllocatedSize = 0;
2709#if (NTDDI_VERSION >= NTDDI_WIN7)
2778RtlWow64GetThreadContext(
2787RtlWow64SetThreadContext(
2983#define RTL_UNCHANGED_UNK_PATH 1
2984#define RTL_CONVERTED_UNC_PATH 2
2985#define RTL_CONVERTED_NT_PATH 3
2986#define RTL_UNCHANGED_DOS_PATH 4
3038#if (NTDDI_VERSION >= NTDDI_WIN7)
3359#ifdef NTOS_MODE_USER
3566#if defined(_M_AMD64)
3577#define RtlCheckBit(BMH,BP) (((((PLONG)(BMH)->Buffer)[(BP)/32]) >> ((BP)%32)) & 0x1)
3832#if defined(NTOS_MODE_USER) || defined(_NTIFS_)
4004#ifdef NTOS_MODE_USER
4034RtlActivateActivationContextUnsafeFast(
4035 _In_ PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame,
4042RtlAllocateActivationContextStack(
4051 _In_ PACTIVATION_CONTEXT_DATA ActivationContextData,
4083RtlFreeActivationContextStack(
4095RtlDeactivateActivationContextUnsafeFast(
4096 _In_ PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame
4141RtlQueryInformationActiveActivationContext(
4238#ifdef NTOS_MODE_USER
4336#if defined(NTOS_MODE_USER) && !defined(NO_RTL_INLINES)
4350 Result.QuadPart = SignedInteger;