ReactOS  0.4.14-dev-583-g2a1ba2c
rtlfuncs.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Runtime Library Functions *
3  ******************************************************************************/
4 
6 #define FAST_FAIL_LEGACY_GS_VIOLATION 0
7 #define FAST_FAIL_VTGUARD_CHECK_FAILURE 1
8 #define FAST_FAIL_STACK_COOKIE_CHECK_FAILURE 2
9 #define FAST_FAIL_CORRUPT_LIST_ENTRY 3
10 #define FAST_FAIL_INCORRECT_STACK 4
11 #define FAST_FAIL_INVALID_ARG 5
12 #define FAST_FAIL_GS_COOKIE_INIT 6
13 #define FAST_FAIL_FATAL_APP_EXIT 7
14 #define FAST_FAIL_RANGE_CHECK_FAILURE 8
15 #define FAST_FAIL_UNSAFE_REGISTRY_ACCESS 9
16 #define FAST_FAIL_GUARD_ICALL_CHECK_FAILURE 10
17 #define FAST_FAIL_GUARD_WRITE_CHECK_FAILURE 11
18 #define FAST_FAIL_INVALID_FIBER_SWITCH 12
19 #define FAST_FAIL_INVALID_SET_OF_CONTEXT 13
20 #define FAST_FAIL_INVALID_REFERENCE_COUNT 14
21 #define FAST_FAIL_INVALID_JUMP_BUFFER 18
22 #define FAST_FAIL_MRDATA_MODIFIED 19
23 #define FAST_FAIL_INVALID_FAST_FAIL_CODE 0xFFFFFFFF
24 
27 VOID
28 RtlFailFast(
29  _In_ ULONG Code)
30 {
31  __fastfail(Code);
32 }
33 
34 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS) && (defined(_M_CEE_PURE) || defined(_M_CEE_SAFE))
35 #define NO_KERNEL_LIST_ENTRY_CHECKS
36 #endif
37 
38 #if !defined(EXTRA_KERNEL_LIST_ENTRY_CHECKS) && defined(__REACTOS__)
39 #define EXTRA_KERNEL_LIST_ENTRY_CHECKS
40 #endif
41 
42 #if !defined(MIDL_PASS) && !defined(SORTPP_PASS)
43 
44 #define RTL_STATIC_LIST_HEAD(x) LIST_ENTRY x = { &x, &x }
45 
47 VOID
49  _Out_ PLIST_ENTRY ListHead)
50 {
51  ListHead->Flink = ListHead->Blink = ListHead;
52 }
53 
56 BOOLEAN
58  _In_ const LIST_ENTRY * ListHead)
59 {
60  return (BOOLEAN)(ListHead->Flink == ListHead);
61 }
62 
64 BOOLEAN
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 }
77 
78 #if !defined(NO_KERNEL_LIST_ENTRY_CHECKS)
80 VOID
82  _In_ PVOID P1,
83  _In_ PVOID P2,
84  _In_ PVOID P3)
85 {
89 
90  RtlFailFast(FAST_FAIL_CORRUPT_LIST_ENTRY);
91 }
92 
94 VOID
97 {
98  if (Entry->Flink->Blink != Entry || Entry->Blink->Flink != Entry)
99  FatalListEntryError(Entry->Blink, Entry, Entry->Flink);
100 }
101 #endif
102 
104 BOOLEAN
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 }
125 
129  _Inout_ PLIST_ENTRY ListHead)
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 }
151 
155  _Inout_ PLIST_ENTRY ListHead)
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 }
177 
179 VOID
181  _Inout_ PLIST_ENTRY ListHead,
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 }
198 
200 VOID
202  _Inout_ PLIST_ENTRY ListHead,
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 }
219 
221 VOID
223  _Inout_ PLIST_ENTRY ListHead,
224  _Inout_ PLIST_ENTRY ListToAppend)
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 }
237 
241  _Inout_ PSINGLE_LIST_ENTRY ListHead)
242 {
243  PSINGLE_LIST_ENTRY FirstEntry;
244  FirstEntry = ListHead->Next;
245  if (FirstEntry != NULL) {
246  ListHead->Next = FirstEntry->Next;
247  }
248  return FirstEntry;
249 }
250 
252 VOID
254  _Inout_ PSINGLE_LIST_ENTRY ListHead,
256 {
257  Entry->Next = ListHead->Next;
258  ListHead->Next = Entry;
259 }
260 
261 #endif /* !defined(MIDL_PASS) && !defined(SORTPP_PASS) */
262 
264 NTSYSAPI
265 VOID
266 NTAPI
267 RtlAssert(
268  _In_ PVOID FailedAssertion,
272 
273 /* VOID
274  * RtlCopyMemory(
275  * IN VOID UNALIGNED *Destination,
276  * IN CONST VOID UNALIGNED *Source,
277  * IN SIZE_T Length)
278  */
279 #define RtlCopyMemory(Destination, Source, Length) \
280  memcpy(Destination, Source, Length)
281 
282 #define RtlCopyBytes RtlCopyMemory
283 
284 #if defined(_M_AMD64)
285 NTSYSAPI
286 VOID
287 NTAPI
291  _In_ SIZE_T Length);
292 #else
293 #define RtlCopyMemoryNonTemporal RtlCopyMemory
294 #endif
295 
296 /* BOOLEAN
297  * RtlEqualLuid(
298  * IN PLUID Luid1,
299  * IN PLUID Luid2)
300  */
301 #define RtlEqualLuid(Luid1, Luid2) \
302  (((Luid1)->LowPart == (Luid2)->LowPart) && ((Luid1)->HighPart == (Luid2)->HighPart))
303 
304 /* LOGICAL
305  * RtlEqualMemory(
306  * IN VOID UNALIGNED *Destination,
307  * IN CONST VOID UNALIGNED *Source,
308  * IN SIZE_T Length)
309  */
310 #define RtlEqualMemory(Destination, Source, Length) \
311  (!memcmp(Destination, Source, Length))
312 
313 /* VOID
314  * RtlFillMemory(
315  * IN VOID UNALIGNED *Destination,
316  * IN SIZE_T Length,
317  * IN UCHAR Fill)
318  */
319 #define RtlFillMemory(Destination, Length, Fill) \
320  memset(Destination, Fill, Length)
321 
322 #define RtlFillBytes RtlFillMemory
323 
325 NTSYSAPI
326 VOID
327 NTAPI
331 
334 NTSYSAPI
335 NTSTATUS
336 NTAPI
340 
344 _At_(DestinationString->Length, _Post_equal_to_(_String_length_(SourceString) * sizeof(WCHAR)))
349 NTSYSAPI
350 VOID
351 NTAPI
355 
356 /* VOID
357  * RtlMoveMemory(
358  * IN VOID UNALIGNED *Destination,
359  * IN CONST VOID UNALIGNED *Source,
360  * IN SIZE_T Length)
361  */
362 #define RtlMoveMemory(Destination, Source, Length) \
363  memmove(Destination, Source, Length)
364 
367 NTSYSAPI
368 NTSTATUS
369 NTAPI
371  _In_ REFGUID Guid,
372  _Out_ _At_(GuidString->Buffer, __drv_allocatesMem(Mem))
374 
375 /* VOID
376  * RtlZeroMemory(
377  * IN VOID UNALIGNED *Destination,
378  * IN SIZE_T Length)
379  */
380 #define RtlZeroMemory(Destination, Length) \
381  memset(Destination, 0, Length)
382 
383 #define RtlZeroBytes RtlZeroMemory
385 
386 #if (NTDDI_VERSION >= NTDDI_WIN2K)
387 
388 $if (_WDMDDK_)
390 NTSYSAPI
391 BOOLEAN
392 NTAPI
394  _In_ PRTL_BITMAP BitMapHeader,
396  _In_ ULONG Length);
397 
399 NTSYSAPI
400 BOOLEAN
401 NTAPI
403  _In_ PRTL_BITMAP BitMapHeader,
405  _In_ ULONG Length);
406 
409 NTSYSAPI
410 NTSTATUS
411 NTAPI
418 
420 NTSYSAPI
421 ULONG
422 NTAPI
425 
426 #define RtlAnsiStringToUnicodeSize(String) ( \
427  NLS_MB_CODE_PAGE_TAG ? \
428  RtlxAnsiStringToUnicodeSize(String) : \
429  ((String)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
430 )
431 
432 _Success_(1)
437  _At_(return, _Out_range_(==, 0)))
440  _At_(return, _Out_range_(<, 0)))
441 NTSYSAPI
442 NTSTATUS
443 NTAPI
447 
448 _Success_(1)
451 /* _When_(_Old_(Destination->Length) + _String_length_(Source) * sizeof(WCHAR) <= Destination->MaximumLength,
452  _At_(Destination->Length, _Post_equal_to_(_Old_(Destination->Length) + _String_length_(Source) * sizeof(WCHAR)))
453  _At_(return, _Out_range_(==, 0)))
454 _When_(_Old_(Destination->Length) + _String_length_(Source) * sizeof(WCHAR) > Destination->MaximumLength,
455  _Unchanged_(Destination->Length)
456  _At_(return, _Out_range_(<, 0))) */
457 NTSYSAPI
458 NTSTATUS
459 NTAPI
463 
466 NTSYSAPI
467 NTSTATUS
468 NTAPI
470  _In_ ULONG RelativeTo,
472 
473 NTSYSAPI
474 VOID
475 NTAPI
477  _In_ PRTL_BITMAP BitMapHeader);
478 
479 NTSYSAPI
480 VOID
481 NTAPI
483  _In_ PRTL_BITMAP BitMapHeader,
484  _In_range_(0, BitMapHeader->SizeOfBitMap - NumberToClear) ULONG StartingIndex,
485  _In_range_(0, BitMapHeader->SizeOfBitMap - StartingIndex) ULONG NumberToClear);
486 
488 NTSYSAPI
489 SIZE_T
490 NTAPI
492  _In_ const VOID *Source1,
493  _In_ const VOID *Source2,
494  _In_ SIZE_T Length);
495 
498 NTSYSAPI
499 LONG
500 NTAPI
502  _In_ PCUNICODE_STRING String1,
505 
508 NTSYSAPI
509 LONG
510 NTAPI
512  _In_reads_(String1Length) PCWCH String1,
517 
525 NTSYSAPI
526 VOID
527 NTAPI
531 
533 NTSYSAPI
534 NTSTATUS
535 NTAPI
537  _In_ ULONG RelativeTo,
538  _In_ PWSTR Path);
539 
541 NTSYSAPI
542 NTSTATUS
543 NTAPI
547 
549 NTSYSAPI
550 NTSTATUS
551 NTAPI
553  _In_ ULONG RelativeTo,
556 
559 NTSYSAPI
560 BOOLEAN
561 NTAPI
563  _In_ CONST UNICODE_STRING *String1,
566 
567 #if !defined(_AMD64_) && !defined(_IA64_)
568 NTSYSAPI
570 NTAPI
572  _In_ LARGE_INTEGER Multiplicand,
573  _In_ LONG Multiplier);
574 
575 NTSYSAPI
577 NTAPI
579  _In_ LARGE_INTEGER Dividend,
582 #endif
583 
584 #if defined(_X86_) || defined(_IA64_)
585 NTSYSAPI
587 NTAPI
589  _In_ LARGE_INTEGER Dividend,
590  _In_ LARGE_INTEGER MagicDivisor,
591  _In_ CCHAR ShiftCount);
592 #endif
593 
595 NTSYSAPI
596 VOID
597 NTAPI
599  _Inout_ _At_(AnsiString->Buffer, __drv_freesMem(Mem))
601 
602 _Success_(return != -1)
604 NTSYSAPI
605 ULONG
606 NTAPI
608  _In_ PRTL_BITMAP BitMapHeader,
611 
612 _Success_(return != -1)
613 NTSYSAPI
614 ULONG
615 NTAPI
617  _In_ PRTL_BITMAP BitMapHeader,
620 
621 NTSYSAPI
622 ULONG
623 NTAPI
625  _In_ PRTL_BITMAP BitMapHeader,
627 
628 NTSYSAPI
629 ULONG
630 NTAPI
632  _In_ PRTL_BITMAP BitMapHeader,
633  _Out_writes_to_(SizeOfRunArray, return) PRTL_BITMAP_RUN RunArray,
634  _In_range_(>, 0) ULONG SizeOfRunArray,
635  _In_ BOOLEAN LocateLongestRuns);
636 
637 NTSYSAPI
638 ULONG
639 NTAPI
641  _In_ PRTL_BITMAP BitMapHeader,
642  _In_ ULONG FromIndex,
643  _Out_ PULONG StartingRunIndex);
644 
645 _Success_(return != -1)
647 NTSYSAPI
648 CCHAR
649 NTAPI
651  _In_ ULONGLONG Set);
652 
653 NTSYSAPI
654 ULONG
655 NTAPI
657  _In_ PRTL_BITMAP BitMapHeader,
659 
660 _Success_(return != -1)
662 NTSYSAPI
663 CCHAR
664 NTAPI
666  _In_ ULONGLONG Set);
667 
668 NTSYSAPI
669 ULONG
670 NTAPI
672  _In_ PRTL_BITMAP BitMapHeader,
673  _In_ ULONG FromIndex,
674  _Out_ PULONG StartingRunIndex);
675 
676 _Success_(return != -1)
678 NTSYSAPI
679 ULONG
680 NTAPI
682  _In_ PRTL_BITMAP BitMapHeader,
685 
686 _Success_(return != -1)
687 NTSYSAPI
688 ULONG
689 NTAPI
691  _In_ PRTL_BITMAP BitMapHeader,
694 
696 NTSYSAPI
697 VOID
698 NTAPI
702 
703 _At_(BitMapHeader->SizeOfBitMap, _Post_equal_to_(SizeOfBitMap))
704 _At_(BitMapHeader->Buffer, _Post_equal_to_(BitMapBuffer))
705 NTSYSAPI
706 VOID
707 NTAPI
709  _Out_ PRTL_BITMAP BitMapHeader,
710  _In_opt_ __drv_aliasesMem PULONG BitMapBuffer,
711  _In_opt_ ULONG SizeOfBitMap);
712 
714 NTSYSAPI
715 VOID
716 NTAPI
720 
723 NTSYSAPI
724 NTSTATUS
725 NTAPI
727  _In_ ULONG Value,
730 
733 NTSYSAPI
734 NTSTATUS
735 NTAPI
740 
741 #ifdef _WIN64
742 #define RtlIntPtrToUnicodeString(Value, Base, String) \
743  RtlInt64ToUnicodeString(Value, Base, String)
744 #else
745 #define RtlIntPtrToUnicodeString(Value, Base, String) \
746  RtlIntegerToUnicodeString(Value, Base, String)
747 #endif
748 
749 /* BOOLEAN
750  * RtlIsZeroLuid(
751  * IN PLUID L1);
752  */
753 #define RtlIsZeroLuid(_L1) \
754  ((BOOLEAN) ((!(_L1)->LowPart) && (!(_L1)->HighPart)))
755 
757 NTSYSAPI
758 ULONG
759 NTAPI
762 
763 NTSYSAPI
764 ULONG
765 NTAPI
767  _In_ PRTL_BITMAP BitMapHeader);
768 
769 NTSYSAPI
770 ULONG
771 NTAPI
773  _In_ PRTL_BITMAP BitMapHeader);
774 
776 NTSYSAPI
777 NTSTATUS
778 NTAPI
780  _In_ ULONG RelativeTo,
781  _In_ PCWSTR Path,
782  _Inout_ _At_(*(*QueryTable).EntryContext, _Pre_unknown_)
786 
787 #define SHORT_SIZE (sizeof(USHORT))
788 #define SHORT_MASK (SHORT_SIZE - 1)
789 #define LONG_SIZE (sizeof(LONG))
790 #define LONGLONG_SIZE (sizeof(LONGLONG))
791 #define LONG_MASK (LONG_SIZE - 1)
792 #define LONGLONG_MASK (LONGLONG_SIZE - 1)
793 #define LOWBYTE_MASK 0x00FF
794 
795 #define FIRSTBYTE(VALUE) ((VALUE) & LOWBYTE_MASK)
796 #define SECONDBYTE(VALUE) (((VALUE) >> 8) & LOWBYTE_MASK)
797 #define THIRDBYTE(VALUE) (((VALUE) >> 16) & LOWBYTE_MASK)
798 #define FOURTHBYTE(VALUE) (((VALUE) >> 24) & LOWBYTE_MASK)
799 
800 NTSYSAPI
801 VOID
802 NTAPI
804  _In_ PRTL_BITMAP BitMapHeader);
805 
806 NTSYSAPI
807 VOID
808 NTAPI
809 RtlSetBits(
810  _In_ PRTL_BITMAP BitMapHeader,
811  _In_range_(0, BitMapHeader->SizeOfBitMap - NumberToSet) ULONG StartingIndex,
812  _In_range_(0, BitMapHeader->SizeOfBitMap - StartingIndex) ULONG NumberToSet);
813 
815 NTSYSAPI
816 NTSTATUS
817 NTAPI
823 
824 #if defined(_AMD64_)
825 
826 /* VOID
827  * RtlStoreUlong(
828  * IN PULONG Address,
829  * IN ULONG Value);
830  */
831 #define RtlStoreUlong(Address,Value) \
832  *(ULONG UNALIGNED *)(Address) = (Value)
833 
834 /* VOID
835  * RtlStoreUlonglong(
836  * IN OUT PULONGLONG Address,
837  * ULONGLONG Value);
838  */
839 #define RtlStoreUlonglong(Address,Value) \
840  *(ULONGLONG UNALIGNED *)(Address) = (Value)
841 
842 /* VOID
843  * RtlStoreUshort(
844  * IN PUSHORT Address,
845  * IN USHORT Value);
846  */
847 #define RtlStoreUshort(Address,Value) \
848  *(USHORT UNALIGNED *)(Address) = (Value)
849 
850 /* VOID
851  * RtlRetrieveUshort(
852  * PUSHORT DestinationAddress,
853  * PUSHORT SourceAddress);
854  */
855 #define RtlRetrieveUshort(DestAddress,SrcAddress) \
856  *(USHORT UNALIGNED *)(DestAddress) = *(USHORT)(SrcAddress)
857 
858 /* VOID
859  * RtlRetrieveUlong(
860  * PULONG DestinationAddress,
861  * PULONG SourceAddress);
862  */
863 #define RtlRetrieveUlong(DestAddress,SrcAddress) \
864  *(ULONG UNALIGNED *)(DestAddress) = *(PULONG)(SrcAddress)
865 
866 #else
867 
868 #define RtlStoreUlong(Address,Value) \
869  if ((ULONG_PTR)(Address) & LONG_MASK) { \
870  ((PUCHAR) (Address))[LONG_LEAST_SIGNIFICANT_BIT] = (UCHAR)(FIRSTBYTE(Value)); \
871  ((PUCHAR) (Address))[LONG_3RD_MOST_SIGNIFICANT_BIT] = (UCHAR)(SECONDBYTE(Value)); \
872  ((PUCHAR) (Address))[LONG_2ND_MOST_SIGNIFICANT_BIT] = (UCHAR)(THIRDBYTE(Value)); \
873  ((PUCHAR) (Address))[LONG_MOST_SIGNIFICANT_BIT] = (UCHAR)(FOURTHBYTE(Value)); \
874  } \
875  else { \
876  *((PULONG)(Address)) = (ULONG) (Value); \
877  }
878 
879 #define RtlStoreUlonglong(Address,Value) \
880  if ((ULONG_PTR)(Address) & LONGLONG_MASK) { \
881  RtlStoreUlong((ULONG_PTR)(Address), \
882  (ULONGLONG)(Value) & 0xFFFFFFFF); \
883  RtlStoreUlong((ULONG_PTR)(Address)+sizeof(ULONG), \
884  (ULONGLONG)(Value) >> 32); \
885  } else { \
886  *((PULONGLONG)(Address)) = (ULONGLONG)(Value); \
887  }
888 
889 #define RtlStoreUshort(Address,Value) \
890  if ((ULONG_PTR)(Address) & SHORT_MASK) { \
891  ((PUCHAR) (Address))[SHORT_LEAST_SIGNIFICANT_BIT] = (UCHAR)(FIRSTBYTE(Value)); \
892  ((PUCHAR) (Address))[SHORT_MOST_SIGNIFICANT_BIT ] = (UCHAR)(SECONDBYTE(Value)); \
893  } \
894  else { \
895  *((PUSHORT) (Address)) = (USHORT)Value; \
896  }
897 
898 #define RtlRetrieveUshort(DestAddress,SrcAddress) \
899  if ((ULONG_PTR)(SrcAddress) & LONG_MASK) \
900  { \
901  ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
902  ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
903  } \
904  else \
905  { \
906  *((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
907  }
908 
909 #define RtlRetrieveUlong(DestAddress,SrcAddress) \
910  if ((ULONG_PTR)(SrcAddress) & LONG_MASK) \
911  { \
912  ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
913  ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
914  ((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
915  ((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
916  } \
917  else \
918  { \
919  *((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
920  }
921 
922 #endif /* defined(_AMD64_) */
923 
924 #ifdef _WIN64
925 /* VOID
926  * RtlStoreUlongPtr(
927  * IN OUT PULONG_PTR Address,
928  * IN ULONG_PTR Value);
929  */
930 #define RtlStoreUlongPtr(Address,Value) RtlStoreUlonglong(Address,Value)
931 #else
932 #define RtlStoreUlongPtr(Address,Value) RtlStoreUlong(Address,Value)
933 #endif /* _WIN64 */
934 
935 _Success_(return!=FALSE)
937 NTSYSAPI
938 BOOLEAN
939 NTAPI
943 
944 NTSYSAPI
945 VOID
946 NTAPI
950 
951 NTSYSAPI
952 USHORT
953 FASTCALL
955  _In_ USHORT Source);
956 
957 NTSYSAPI
958 ULONG
959 FASTCALL
961  _In_ ULONG Source);
962 
963 NTSYSAPI
964 ULONGLONG
965 FASTCALL
968 
971  _Out_range_(<=, (SourceString->MaximumLength / sizeof(WCHAR)))))
977 NTSYSAPI
978 NTSTATUS
979 NTAPI
986 
989 NTSYSAPI
990 NTSTATUS
991 NTAPI
998 
1000 NTSYSAPI
1001 ULONG
1002 NTAPI
1005 
1006 #define RtlUnicodeStringToAnsiSize(String) ( \
1007  NLS_MB_CODE_PAGE_TAG ? \
1008  RtlxUnicodeStringToAnsiSize(String) : \
1009  ((String)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
1010 )
1011 
1013 NTSYSAPI
1014 NTSTATUS
1015 NTAPI
1019  _Out_ PULONG Value);
1020 
1022 NTSYSAPI
1023 WCHAR
1024 NTAPI
1026  _In_ WCHAR SourceCharacter);
1027 
1030 NTSYSAPI
1031 BOOLEAN
1032 NTAPI
1037 
1040 NTSYSAPI
1041 BOOLEAN
1042 NTAPI
1045 
1047 NTSYSAPI
1048 NTSTATUS
1049 NTAPI
1051  _Out_
1052  _At_(lpVersionInformation->dwOSVersionInfoSize, _Pre_ _Valid_)
1053  _When_(lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW),
1054  _At_((PRTL_OSVERSIONINFOEXW)lpVersionInformation, _Out_))
1055  PRTL_OSVERSIONINFOW lpVersionInformation);
1056 
1059 NTSYSAPI
1060 NTSTATUS
1061 NTAPI
1063  _In_ PRTL_OSVERSIONINFOEXW VersionInfo,
1066 
1068 NTSYSAPI
1069 NTSTATUS
1070 NTAPI
1072  _In_ ULONG RelativeTo,
1078 
1079 $endif (_WDMDDK_)
1080 $if (_NTDDK_)
1081 
1082 #ifndef RTL_USE_AVL_TABLES
1083 
1084 NTSYSAPI
1085 VOID
1086 NTAPI
1093 
1094 NTSYSAPI
1095 PVOID
1096 NTAPI
1101  _Out_opt_ PBOOLEAN NewElement);
1102 
1103 NTSYSAPI
1104 PVOID
1105 NTAPI
1110  _Out_opt_ PBOOLEAN NewElement,
1111  _In_ PVOID NodeOrParent,
1112  _In_ TABLE_SEARCH_RESULT SearchResult);
1113 
1114 NTSYSAPI
1115 BOOLEAN
1116 NTAPI
1119  _In_ PVOID Buffer);
1120 
1122 NTSYSAPI
1123 PVOID
1124 NTAPI
1127  _In_ PVOID Buffer);
1128 
1129 NTSYSAPI
1130 PVOID
1131 NTAPI
1134  _In_ PVOID Buffer,
1135  _Out_ PVOID *NodeOrParent,
1136  _Out_ TABLE_SEARCH_RESULT *SearchResult);
1137 
1139 NTSYSAPI
1140 PVOID
1141 NTAPI
1144  _In_ BOOLEAN Restart);
1145 
1147 NTSYSAPI
1148 PVOID
1149 NTAPI
1152  _Inout_ PVOID *RestartKey);
1153 
1155 NTSYSAPI
1156 PVOID
1157 NTAPI
1160  _In_ ULONG I);
1161 
1162 NTSYSAPI
1163 ULONG
1164 NTAPI
1167 
1169 NTSYSAPI
1170 BOOLEAN
1171 NTAPI
1174 
1175 #endif /* !RTL_USE_AVL_TABLES */
1176 
1177 #define RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT 8
1178 
1179 NTSYSAPI
1181 NTAPI
1182 RtlSplay(
1183  _Inout_ PRTL_SPLAY_LINKS Links);
1184 
1185 NTSYSAPI
1187 NTAPI
1188 RtlDelete(
1189  _In_ PRTL_SPLAY_LINKS Links);
1190 
1191 NTSYSAPI
1192 VOID
1193 NTAPI
1195  _In_ PRTL_SPLAY_LINKS Links,
1197 
1199 NTSYSAPI
1201 NTAPI
1203  _In_ PRTL_SPLAY_LINKS Links);
1204 
1206 NTSYSAPI
1208 NTAPI
1210  _In_ PRTL_SPLAY_LINKS Links);
1211 
1213 NTSYSAPI
1215 NTAPI
1217  _In_ PRTL_SPLAY_LINKS Links);
1218 
1220 NTSYSAPI
1222 NTAPI
1224  _In_ PRTL_SPLAY_LINKS Links);
1225 
1228 NTSYSAPI
1229 BOOLEAN
1230 NTAPI
1232  _In_ PCUNICODE_STRING String1,
1235 
1237 NTSYSAPI
1238 VOID
1239 NTAPI
1242  _In_ const STRING *SourceString);
1243 
1246 NTSYSAPI
1247 NTSTATUS
1248 NTAPI
1255 
1257 NTSYSAPI
1258 VOID
1259 NTAPI
1263 
1265 NTSYSAPI
1266 NTSTATUS
1267 NTAPI
1268 RtlVolumeDeviceToDosName(
1269  _In_ PVOID VolumeDeviceObject,
1271 
1274 NTSYSAPI
1275 LONG
1276 NTAPI
1278  _In_ const STRING *String1,
1279  _In_ const STRING *String2,
1281 
1282 NTSYSAPI
1283 VOID
1284 NTAPI
1287  _In_opt_ const STRING *SourceString);
1288 
1291 NTSYSAPI
1292 BOOLEAN
1293 NTAPI
1295  _In_ const STRING *String1,
1296  _In_ const STRING *String2,
1298 
1300 NTSYSAPI
1301 NTSTATUS
1302 NTAPI
1304  _In_z_ PCSZ String,
1306  _Out_ PULONG Value);
1307 
1309 NTSYSAPI
1310 CHAR
1311 NTAPI
1312 RtlUpperChar(
1313  _In_ CHAR Character);
1314 
1315 NTSYSAPI
1316 ULONG
1317 NTAPI
1320  PVOID *Callers,
1321  _In_ ULONG Count,
1322  _In_ ULONG Flags);
1323 
1324 $endif (_NTDDK_)
1325 $if (_NTIFS_)
1326 
1330 NTSYSAPI
1331 PVOID
1332 NTAPI
1334  _In_ HANDLE HeapHandle,
1336  _In_ SIZE_T Size);
1337 
1338 _Success_(return != 0)
1339 NTSYSAPI
1340 BOOLEAN
1341 NTAPI
1342 RtlFreeHeap(
1343  _In_ PVOID HeapHandle,
1346 
1347 NTSYSAPI
1348 VOID
1349 NTAPI
1352 
1353 _Ret_range_(<, MAXLONG)
1354 NTSYSAPI
1355 ULONG
1356 NTAPI
1357 RtlRandom(
1358  _Inout_ PULONG Seed);
1359 
1361 _Success_(return != 0)
1363 NTSYSAPI
1364 BOOLEAN
1365 NTAPI
1370 
1373 NTSYSAPI
1374 BOOLEAN
1375 NTAPI
1377  _In_ const STRING *String1,
1380 
1382 NTSYSAPI
1383 NTSTATUS
1384 NTAPI
1388 
1391 NTSYSAPI
1392 NTSTATUS
1393 NTAPI
1400 
1403 NTSYSAPI
1404 NTSTATUS
1405 NTAPI
1412 
1415 NTSYSAPI
1416 NTSTATUS
1417 NTAPI
1424 
1427 NTSYSAPI
1428 NTSTATUS
1429 NTAPI
1436 
1439 NTSYSAPI
1440 NTSTATUS
1441 NTAPI
1448 
1451 NTSYSAPI
1452 NTSTATUS
1453 NTAPI
1460 
1463 NTSYSAPI
1464 NTSTATUS
1465 NTAPI
1469  PUNICODE_STRING UniDest,
1470  _In_ PCUNICODE_STRING UniSource,
1472 
1474 NTSYSAPI
1475 VOID
1476 NTAPI
1479 
1481 NTSYSAPI
1482 ULONG
1483 NTAPI
1486 
1488 NTSYSAPI
1489 ULONG
1490 NTAPI
1493 
1495 NTSYSAPI
1496 NTSTATUS
1497 NTAPI
1504 
1506 NTSYSAPI
1507 NTSTATUS
1508 NTAPI
1513 
1515 NTSYSAPI
1516 NTSTATUS
1517 NTAPI
1522 
1524 NTSYSAPI
1525 NTSTATUS
1526 NTAPI
1533 
1535 NTSYSAPI
1536 NTSTATUS
1537 NTAPI
1544 
1546 NTSYSAPI
1547 NTSTATUS
1548 NTAPI
1555 
1557 NTSYSAPI
1558 NTSTATUS
1559 NTAPI
1566 
1568 NTSYSAPI
1569 NTSTATUS
1570 NTAPI
1577 
1578 #if (NTDDI_VERSION >= NTDDI_VISTASP1)
1580 NTSYSAPI
1581 NTSTATUS
1582 NTAPI
1588 #else
1590 NTSYSAPI
1591 VOID
1592 NTAPI
1598 #endif
1599 
1602 NTSYSAPI
1603 BOOLEAN
1604 NTAPI
1609 
1612 NTSYSAPI
1613 BOOLEAN
1614 NTAPI
1616  _Inout_ PWCHAR Char);
1617 
1619 NTSYSAPI
1620 VOID
1621 NTAPI
1623  _Out_ PPREFIX_TABLE PrefixTable);
1624 
1626 NTSYSAPI
1627 BOOLEAN
1628 NTAPI
1630  _In_ PPREFIX_TABLE PrefixTable,
1633 
1635 NTSYSAPI
1636 VOID
1637 NTAPI
1639  _In_ PPREFIX_TABLE PrefixTable,
1641 
1644 NTSYSAPI
1646 NTAPI
1648  _In_ PPREFIX_TABLE PrefixTable,
1650 
1652 NTSYSAPI
1653 VOID
1654 NTAPI
1656  _Out_ PUNICODE_PREFIX_TABLE PrefixTable);
1657 
1659 NTSYSAPI
1660 BOOLEAN
1661 NTAPI
1663  _In_ PUNICODE_PREFIX_TABLE PrefixTable,
1666 
1668 NTSYSAPI
1669 VOID
1670 NTAPI
1672  _In_ PUNICODE_PREFIX_TABLE PrefixTable,
1674 
1677 NTSYSAPI
1679 NTAPI
1681  _In_ PUNICODE_PREFIX_TABLE PrefixTable,
1684 
1687 NTSYSAPI
1689 NTAPI
1691  _In_ PUNICODE_PREFIX_TABLE PrefixTable,
1693 
1695 NTSYSAPI
1696 SIZE_T
1697 NTAPI
1700  _In_ SIZE_T Length,
1701  _In_ ULONG Pattern);
1702 
1703 _Success_(return != 0)
1704 NTSYSAPI
1705 BOOLEAN
1706 NTAPI
1710 
1711 NTSYSAPI
1712 VOID
1713 NTAPI
1717 
1718 _Success_(return != 0)
1720 NTSYSAPI
1721 BOOLEAN
1722 NTAPI
1726 
1727 NTSYSAPI
1728 VOID
1729 NTAPI
1733 
1736 NTSYSAPI
1737 BOOLEAN
1738 NTAPI
1739 RtlValidSid(
1740  _In_ PSID Sid);
1741 
1743 NTSYSAPI
1744 BOOLEAN
1745 NTAPI
1746 RtlEqualSid(
1747  _In_ PSID Sid1,
1748  _In_ PSID Sid2);
1749 
1752 NTSYSAPI
1753 BOOLEAN
1754 NTAPI
1756  _In_ PSID Sid1,
1758 
1760 NTSYSAPI
1761 ULONG
1762 NTAPI
1765 
1766 NTSYSAPI
1767 PVOID
1768 NTAPI
1769 RtlFreeSid(
1771 
1773 NTSYSAPI
1774 NTSTATUS
1775 NTAPI
1779  _In_ ULONG SubAuthority0,
1780  _In_ ULONG SubAuthority1,
1781  _In_ ULONG SubAuthority2,
1782  _In_ ULONG SubAuthority3,
1783  _In_ ULONG SubAuthority4,
1784  _In_ ULONG SubAuthority5,
1785  _In_ ULONG SubAuthority6,
1786  _In_ ULONG SubAuthority7,
1787  _Outptr_ PSID *Sid);
1788 
1790 NTSYSAPI
1791 NTSTATUS
1792 NTAPI
1794  _Out_ PSID Sid,
1797 
1798 NTSYSAPI
1799 PULONG
1800 NTAPI
1802  _In_ PSID Sid,
1803  _In_ ULONG SubAuthority);
1804 
1806 NTSYSAPI
1807 ULONG
1808 NTAPI
1809 RtlLengthSid(
1810  _In_ PSID Sid);
1811 
1813 NTSYSAPI
1814 NTSTATUS
1815 NTAPI
1816 RtlCopySid(
1817  _In_ ULONG DestinationSidLength,
1818  _Out_writes_bytes_(DestinationSidLength) PSID DestinationSid,
1820 
1822 NTSYSAPI
1823 NTSTATUS
1824 NTAPI
1829 
1831 NTSYSAPI
1832 VOID
1833 NTAPI
1834 RtlCopyLuid(
1835  _Out_ PLUID DestinationLuid,
1837 
1839 NTSYSAPI
1840 NTSTATUS
1841 NTAPI
1842 RtlCreateAcl(
1846 
1848 NTSYSAPI
1849 NTSTATUS
1850 NTAPI
1851 RtlAddAce(
1852  _Inout_ PACL Acl,
1857 
1859 NTSYSAPI
1860 NTSTATUS
1861 NTAPI
1862 RtlDeleteAce(
1863  _Inout_ PACL Acl,
1865 
1866 NTSYSAPI
1867 NTSTATUS
1868 NTAPI
1869 RtlGetAce(
1870  _In_ PACL Acl,
1872  _Outptr_ PVOID *Ace);
1873 
1875 NTSYSAPI
1876 NTSTATUS
1877 NTAPI
1879  _Inout_ PACL Acl,
1882  _In_ PSID Sid);
1883 
1885 NTSYSAPI
1886 NTSTATUS
1887 NTAPI
1889  _Inout_ PACL Acl,
1893  _In_ PSID Sid);
1894 
1896 NTSYSAPI
1897 NTSTATUS
1898 NTAPI
1901  _In_ ULONG Revision);
1902 
1903 NTSYSAPI
1904 NTSTATUS
1905 NTAPI
1909  _Out_ PACL *Dacl,
1911 
1913 NTSYSAPI
1914 NTSTATUS
1915 NTAPI
1920 
1922 NTSYSAPI
1923 NTSTATUS
1924 NTAPI
1927  _Out_ PSID *Owner,
1929 
1931 _When_(Status < 0, _Out_range_(>, 0))
1932 _When_(Status >= 0, _Out_range_(==, 0))
1933 NTSYSAPI
1934 ULONG
1935 NTAPI
1937  _In_ NTSTATUS Status);
1938 
1940 NTSYSAPI
1941 NTSTATUS
1942 NTAPI
1944  _In_ PCPTABLEINFO CustomCP,
1948  _In_reads_bytes_(BytesInCustomCPString) PCH CustomCPString,
1950 
1952 NTSYSAPI
1953 NTSTATUS
1954 NTAPI
1956  _In_ PCPTABLEINFO CustomCP,
1962 
1964 NTSYSAPI
1965 NTSTATUS
1966 NTAPI
1968  _In_ PCPTABLEINFO CustomCP,
1974 
1976 NTSYSAPI
1977 VOID
1978 NTAPI
1980  _In_ PUSHORT TableBase,
1982 
1983 $endif (_NTIFS_)
1984 
1985 #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
1986 
1987 $if (_WDMDDK_)
1988 
1989 #if (NTDDI_VERSION >= NTDDI_WIN2KSP3)
1990 NTSYSAPI
1991 VOID
1992 FASTCALL
1994  _In_ PVOID Source,
1995  _In_ SIZE_T Length);
1996 #endif
1997 
1998 $endif (_WDMDDK_)
1999 
2000 #if (NTDDI_VERSION >= NTDDI_WINXP)
2001 
2002 $if (_WDMDDK_)
2003 
2004 NTSYSAPI
2005 VOID
2006 NTAPI
2007 RtlClearBit(
2008  _In_ PRTL_BITMAP BitMapHeader,
2009  _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber);
2010 
2012 NTSYSAPI
2013 WCHAR
2014 NTAPI
2016  _In_ WCHAR SourceCharacter);
2017 
2018 NTSYSAPI
2019 VOID
2020 NTAPI
2021 RtlSetBit(
2022  _In_ PRTL_BITMAP BitMapHeader,
2023  _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber);
2024 
2026 NTSYSAPI
2027 BOOLEAN
2028 NTAPI
2029 RtlTestBit(
2030  _In_ PRTL_BITMAP BitMapHeader,
2031  _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber);
2032 
2034 NTSYSAPI
2035 NTSTATUS
2036 NTAPI
2042 
2043 $endif (_WDMDDK_)
2044 
2045 $if (_NTDDK_)
2046 
2047 NTSYSAPI
2048 VOID
2049 NTAPI
2056 
2057 NTSYSAPI
2058 PVOID
2059 NTAPI
2064  _Out_opt_ PBOOLEAN NewElement);
2065 
2066 NTSYSAPI
2067 PVOID
2068 NTAPI
2073  _Out_opt_ PBOOLEAN NewElement,
2074  _In_ PVOID NodeOrParent,
2075  _In_ TABLE_SEARCH_RESULT SearchResult);
2076 
2077 NTSYSAPI
2078 BOOLEAN
2079 NTAPI
2082  _In_ PVOID Buffer);
2083 
2085 NTSYSAPI
2086 PVOID
2087 NTAPI
2090  _In_ PVOID Buffer);
2091 
2092 NTSYSAPI
2093 PVOID
2094 NTAPI
2097  _In_ PVOID Buffer,
2098  _Out_ PVOID *NodeOrParent,
2099  _Out_ TABLE_SEARCH_RESULT *SearchResult);
2100 
2102 NTSYSAPI
2103 PVOID
2104 NTAPI
2107  _In_ BOOLEAN Restart);
2108 
2110 NTSYSAPI
2111 PVOID
2112 NTAPI
2115  _Inout_ PVOID *RestartKey);
2116 
2118 NTSYSAPI
2119 PVOID
2120 NTAPI
2123  _In_ PVOID Buffer,
2124  _Out_ PVOID *RestartKey);
2125 
2127 NTSYSAPI
2128 PVOID
2129 NTAPI
2132  _In_opt_ PRTL_AVL_MATCH_FUNCTION MatchFunction,
2134  _In_ ULONG NextFlag,
2135  _Inout_ PVOID *RestartKey,
2136  _Inout_ PULONG DeleteCount,
2137  _In_ PVOID Buffer);
2138 
2140 NTSYSAPI
2141 PVOID
2142 NTAPI
2145  _In_ ULONG I);
2146 
2147 NTSYSAPI
2148 ULONG
2149 NTAPI
2152 
2154 NTSYSAPI
2155 BOOLEAN
2156 NTAPI
2159 
2160 $endif (_NTDDK_)
2161 $if (_NTIFS_)
2162 
2164 NTSYSAPI
2165 PVOID
2166 NTAPI
2168  _In_ ULONG Flags,
2174 
2175 NTSYSAPI
2176 PVOID
2177 NTAPI
2179  _In_ _Post_invalid_ PVOID HeapHandle);
2180 
2181 NTSYSAPI
2182 USHORT
2183 NTAPI
2185  _In_ ULONG FramesToSkip,
2186  _In_ ULONG FramesToCapture,
2187  _Out_writes_to_(FramesToCapture, return) PVOID *BackTrace,
2188  _Out_opt_ PULONG BackTraceHash);
2189 
2190 _Ret_range_(<, MAXLONG)
2191 NTSYSAPI
2192 ULONG
2193 NTAPI
2194 RtlRandomEx(
2195  _Inout_ PULONG Seed);
2196 
2198 NTSYSAPI
2199 NTSTATUS
2200 NTAPI
2204 
2206 NTSYSAPI
2207 NTSTATUS
2208 NTAPI
2210  _In_ ULONG Flags,
2212 
2215 NTSYSAPI
2216 NTSTATUS
2217 NTAPI
2219  _In_ ULONG Flags,
2222 
2223 NTSYSAPI
2224 NTSTATUS
2225 NTAPI
2227  _In_ USHORT CompressionFormatAndEngine,
2228  _Out_ PULONG CompressBufferWorkSpaceSize,
2229  _Out_ PULONG CompressFragmentWorkSpaceSize);
2230 
2231 NTSYSAPI
2232 NTSTATUS
2233 NTAPI
2235  _In_ USHORT CompressionFormatAndEngine,
2236  _In_reads_bytes_(UncompressedBufferSize) PUCHAR UncompressedBuffer,
2240  _In_ ULONG UncompressedChunkSize,
2241  _Out_ PULONG FinalCompressedSize,
2242  _In_ PVOID WorkSpace);
2243 
2245 NTSYSAPI
2246 NTSTATUS
2247 NTAPI
2249  _In_ USHORT CompressionFormat,
2255 
2257 NTSYSAPI
2258 NTSTATUS
2259 NTAPI
2261  _In_ USHORT CompressionFormat,
2266  _In_range_(<, CompressedBufferSize) ULONG FragmentOffset,
2268  _In_ PVOID WorkSpace);
2269 
2271 NTSYSAPI
2272 NTSTATUS
2273 NTAPI
2275  _In_ USHORT CompressionFormat,
2280 
2282 NTSYSAPI
2283 NTSTATUS
2284 NTAPI
2286  _In_ USHORT CompressionFormat,
2290  _In_ ULONG ChunkSize);
2291 
2293 NTSYSAPI
2294 NTSTATUS
2295 NTAPI
2297  _Out_writes_bytes_(UncompressedBufferSize) PUCHAR UncompressedBuffer,
2301  _In_reads_bytes_(CompressedTailSize) PUCHAR CompressedTail,
2304 
2306 NTSYSAPI
2307 NTSTATUS
2308 NTAPI
2310  _In_reads_bytes_(UncompressedBufferSize) PUCHAR UncompressedBuffer,
2316  _In_ PVOID WorkSpace);
2317 
2319 NTSYSAPI
2321 NTAPI
2323  _In_ PSID Sid);
2324 
2325 NTSYSAPI
2326 PUCHAR
2327 NTAPI
2329  _In_ PSID Sid);
2330 
2331 _When_(Status < 0, _Out_range_(>, 0))
2332 _When_(Status >= 0, _Out_range_(==, 0))
2333 NTSYSAPI
2334 ULONG
2335 NTAPI
2337  _In_ NTSTATUS Status);
2338 
2340 NTSYSAPI
2341 NTSTATUS
2342 NTAPI
2344  _In_ PCUNICODE_STRING VolumeRootPath);
2345 
2346 #if defined(_M_AMD64)
2347 
2349 VOID
2352  _In_ SIZE_T Length,
2353  _In_ ULONG Pattern)
2354 {
2356  if ((Length /= 4) != 0) {
2357  if (((ULONG64)Address & 4) != 0) {
2358  *Address = Pattern;
2359  if ((Length -= 1) == 0) {
2360  return;
2361  }
2362  Address += 1;
2363  }
2364  __stosq((PULONG64)(Address), Pattern | ((ULONG64)Pattern << 32), Length / 2);
2365  if ((Length & 1) != 0) Address[Length - 1] = Pattern;
2366  }
2367  return;
2368 }
2369 
2370 #define RtlFillMemoryUlonglong(Destination, Length, Pattern) \
2371  __stosq((PULONG64)(Destination), Pattern, (Length) / 8)
2372 
2373 #else
2374 
2375 NTSYSAPI
2376 VOID
2377 NTAPI
2380  IN SIZE_T Length,
2381  IN ULONG Pattern);
2382 
2383 NTSYSAPI
2384 VOID
2385 NTAPI
2388  _In_ SIZE_T Length,
2389  _In_ ULONGLONG Pattern);
2390 
2391 #endif /* defined(_M_AMD64) */
2392 $endif (_NTIFS_)
2393 
2394 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
2395 
2396 $if (_NTIFS_)
2397 #if (NTDDI_VERSION >= NTDDI_WS03)
2399 NTSYSAPI
2400 NTSTATUS
2401 NTAPI
2405 #endif
2406 
2407 #if (NTDDI_VERSION >= NTDDI_WS03SP1)
2408 
2410 NTSYSAPI
2411 NTSTATUS
2412 NTAPI
2416  _Out_ PACL *Sacl,
2418 
2420 NTSYSAPI
2421 NTSTATUS
2422 NTAPI
2427 
2429 NTSYSAPI
2430 NTSTATUS
2431 NTAPI
2434  _Out_ PSID *Group,
2436 
2438 NTSYSAPI
2439 NTSTATUS
2440 NTAPI
2445 
2447 NTSYSAPI
2448 NTSTATUS
2449 NTAPI
2462 
2463 #endif /* (NTDDI_VERSION >= NTDDI_WS03SP1) */
2464 $endif (_NTIFS_)
2465 
2466 #if (NTDDI_VERSION >= NTDDI_VISTA)
2467 
2468 $if (_WDMDDK_)
2469 NTSYSAPI
2470 ULONG
2471 NTAPI
2472 RtlNumberOfSetBitsUlongPtr(
2474 
2475 NTSYSAPI
2476 ULONGLONG
2477 NTAPI
2481  _Out_opt_ PULONGLONG MinimumAddress,
2482  _Out_opt_ PULONGLONG MaximumAddress);
2483 
2484 NTSYSAPI
2485 NTSTATUS
2486 NTAPI
2489  _In_ UCHAR Type,
2492  _In_ ULONGLONG MinimumAddress,
2493  _In_ ULONGLONG MaximumAddress);
2494 
2495 NTSYSAPI
2496 ULONGLONG
2497 NTAPI
2501 
2502 NTSYSAPI
2503 NTSTATUS
2504 NTAPI
2506  _In_ ULONGLONG SourceLength,
2507  _Out_ PULONGLONG TargetLength);
2508 
2509 NTSYSAPI
2510 NTSTATUS
2511 NTAPI
2514  _In_ UCHAR Type,
2516  _In_ ULONGLONG Start);
2517 
2518 $endif (_WDMDDK_)
2519 $if (_NTDDK_)
2520 
2522 NTSYSAPI
2523 VOID
2524 NTAPI
2525 RtlRunOnceInitialize(
2526  _Out_ PRTL_RUN_ONCE RunOnce);
2527 
2530 NTSYSAPI
2531 NTSTATUS
2532 NTAPI
2533 RtlRunOnceExecuteOnce(
2534  _Inout_ PRTL_RUN_ONCE RunOnce,
2538 
2541 NTSYSAPI
2542 NTSTATUS
2543 NTAPI
2545  _Inout_ PRTL_RUN_ONCE RunOnce,
2546  _In_ ULONG Flags,
2548 
2550 NTSYSAPI
2551 NTSTATUS
2552 NTAPI
2554  _Inout_ PRTL_RUN_ONCE RunOnce,
2555  _In_ ULONG Flags,
2557 
2558 NTSYSAPI
2559 BOOLEAN
2560 NTAPI
2562  _In_ ULONG OSMajorVersion,
2563  _In_ ULONG OSMinorVersion,
2564  _In_ ULONG SpMajorVersion,
2565  _In_ ULONG SpMinorVersion,
2566  _Out_ PULONG ReturnedProductType);
2567 
2568 $endif (_NTDDK_)
2569 $if (_NTIFS_)
2570 NTSYSAPI
2571 NTSTATUS
2572 NTAPI
2573 RtlNormalizeString(
2574  _In_ ULONG NormForm,
2579 
2580 NTSYSAPI
2581 NTSTATUS
2582 NTAPI
2584  _In_ ULONG NormForm,
2587  _Out_ PBOOLEAN Normalized);
2588 
2589 NTSYSAPI
2590 NTSTATUS
2591 NTAPI
2593  _In_ ULONG Flags,
2598 
2599 NTSYSAPI
2600 NTSTATUS
2601 NTAPI
2603  IN ULONG Flags,
2608 
2609 NTSYSAPI
2610 NTSTATUS
2611 NTAPI
2613  _In_ ULONG Flags,
2618 
2619 NTSYSAPI
2620 NTSTATUS
2621 NTAPI
2624  _Out_writes_bytes_opt_(*ServiceSidLength) PSID ServiceSid,
2625  _Inout_ PULONG ServiceSidLength);
2626 
2627 NTSYSAPI
2628 LONG
2629 NTAPI
2631  _In_ PCUNICODE_STRING Altitude1,
2632  _In_ PCUNICODE_STRING Altitude2);
2633 
2634 $endif (_NTIFS_)
2635 
2636 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
2637 
2638 #if (NTDDI_VERSION >= NTDDI_WIN7)
2639 
2640 $if (_WDMDDK_)
2643 NTSYSAPI
2644 NTSTATUS
2645 NTAPI
2651  _In_reads_bytes_(UnicodeStringByteCount) PCWCH UnicodeStringSource,
2653 
2656 NTSYSAPI
2657 NTSTATUS
2658 NTAPI
2664  _In_reads_bytes_(UTF8StringByteCount) PCCH UTF8StringSource,
2666 
2667 NTSYSAPI
2668 ULONG64
2669 NTAPI
2671  IN ULONG64 FeatureMask);
2672 
2673 $endif (_WDMDDK_)
2674 $if (_NTDDK_)
2675 
2677 NTSYSAPI
2678 BOOLEAN
2679 NTAPI
2680 RtlCreateHashTable(
2685 
2686 NTSYSAPI
2687 VOID
2688 NTAPI
2692 
2693 NTSYSAPI
2694 BOOLEAN
2695 NTAPI
2701 
2702 NTSYSAPI
2703 BOOLEAN
2704 NTAPI
2709 
2711 NTSYSAPI
2713 NTAPI
2718 
2720 NTSYSAPI
2722 NTAPI
2726 
2727 NTSYSAPI
2728 BOOLEAN
2729 NTAPI
2733 
2735 NTSYSAPI
2737 NTAPI
2741 
2742 NTSYSAPI
2743 VOID
2744 NTAPI
2748 
2749 NTSYSAPI
2750 BOOLEAN
2751 NTAPI
2755 
2757 NTSYSAPI
2759 NTAPI
2763 
2764 NTSYSAPI
2765 VOID
2766 NTAPI
2770 
2771 NTSYSAPI
2772 BOOLEAN
2773 NTAPI
2776 
2777 NTSYSAPI
2778 BOOLEAN
2779 NTAPI
2782 
2783 $endif (_NTDDK_)
2784 $if (_NTIFS_)
2787 NTSYSAPI
2788 NTSTATUS
2789 NTAPI
2794  _In_reads_bytes_(UnicodeStringByteCount) PCWCH UnicodeStringSource,
2796 
2799 NTSYSAPI
2800 NTSTATUS
2801 NTAPI
2806  _In_reads_bytes_(UTF8StringByteCount) PCCH UTF8StringSource,
2808 
2810 NTSYSAPI
2811 NTSTATUS
2812 NTAPI
2813 RtlReplaceSidInSd(
2816  _In_ PSID NewSid,
2818 
2819 NTSYSAPI
2820 NTSTATUS
2821 NTAPI
2824  _In_ ULONG BaseSubAuthority,
2825  _Out_writes_bytes_(*SidLength) PSID Sid,
2826  _Inout_ PULONG SidLength);
2828 
2829 #endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
2830 
2831 $if (_WDMDDK_)
2832 
2833 #if !defined(MIDL_PASS)
2834 /* inline funftions */
2835 //DECLSPEC_DEPRECATED_DDK_WINXP
2836 static __inline
2840  _In_ LONG SignedInteger)
2841 {
2843  ret.QuadPart = SignedInteger;
2844  return ret;
2845 }
2846 
2847 //DECLSPEC_DEPRECATED_DDK_WINXP
2848 static __inline
2852  _In_ ULONG UnsignedInteger)
2853 {
2855  ret.QuadPart = UnsignedInteger;
2856  return ret;
2857 }
2858 
2859 //DECLSPEC_DEPRECATED_DDK_WINXP
2860 static __inline
2864  _In_ LARGE_INTEGER LargeInteger,
2865  _In_ CCHAR ShiftCount)
2866 {
2868 
2869  Result.QuadPart = LargeInteger.QuadPart << ShiftCount;
2870  return Result;
2871 }
2872 
2873 //DECLSPEC_DEPRECATED_DDK_WINXP
2874 static __inline
2878  _In_ LARGE_INTEGER LargeInteger,
2879  _In_ CCHAR ShiftCount)
2880 {
2882 
2883  Result.QuadPart = (ULONG64)LargeInteger.QuadPart >> ShiftCount;
2884  return Result;
2885 }
2886 
2887 //DECLSPEC_DEPRECATED_DDK
2888 static __inline
2889 ULONG
2892  _In_ ULARGE_INTEGER Dividend,
2893  _In_ ULONG Divisor,
2895 {
2896  if (Remainder)
2897  *Remainder = (ULONG)(Dividend.QuadPart % Divisor);
2898  return (ULONG)(Dividend.QuadPart / Divisor);
2899 }
2900 
2901 //DECLSPEC_DEPRECATED_DDK
2902 static __inline
2906  _In_ LARGE_INTEGER Subtrahend)
2907 {
2908  LARGE_INTEGER Difference;
2909 
2910  Difference.QuadPart = -Subtrahend.QuadPart;
2911  return Difference;
2912 }
2913 
2914 //DECLSPEC_DEPRECATED_DDK
2915 static __inline
2919  _In_ LARGE_INTEGER Minuend,
2920  _In_ LARGE_INTEGER Subtrahend)
2921 {
2922  LARGE_INTEGER Difference;
2923 
2924  Difference.QuadPart = Minuend.QuadPart - Subtrahend.QuadPart;
2925  return Difference;
2926 }
2927 
2928 //DECLSPEC_DEPRECATED_DDK
2929 static __inline
2933  _In_ ULONG Multiplicand,
2934  _In_ ULONG Multiplier)
2935 {
2937  ret.QuadPart = (ULONGLONG)Multiplicand * (ULONGLONG)Multiplier;
2938  return ret;
2939 }
2940 
2941 //DECLSPEC_DEPRECATED_DDK
2942 static __inline
2946  _In_ LONG Multiplicand,
2947  _In_ LONG Multiplier)
2948 {
2950  ret.QuadPart = (LONGLONG)Multiplicand * (ULONGLONG)Multiplier;
2951  return ret;
2952 }
2953 
2955 _At_(AnsiString->Length, _Post_equal_to_(0))
2958 VOID
2959 RtlInitEmptyAnsiString(
2963 {
2964  AnsiString->Length = 0;
2965  AnsiString->MaximumLength = BufferSize;
2966  AnsiString->Buffer = Buffer;
2967 }
2968 
2970 _At_(UnicodeString->Length, _Post_equal_to_(0))
2973 VOID
2974 RtlInitEmptyUnicodeString(
2977  _When_(BufferSize != 0, _Notnull_)
2981  UnicodeString->Length = 0;
2982  UnicodeString->MaximumLength = BufferSize;
2983  UnicodeString->Buffer = Buffer;
2984 }
2985 $endif (_WDMDDK_)
2986 
2987 #if defined(_AMD64_) || defined(_IA64_)
2988 
2989 $if (_WDMDDK_)
2990 
2991 static __inline
2995  _In_ LARGE_INTEGER Multiplicand,
2996  _In_ LONG Multiplier)
2997 {
2999  ret.QuadPart = Multiplicand.QuadPart * Multiplier;
3000  return ret;
3001 }
3002 
3003 static __inline
3007  _In_ LARGE_INTEGER Dividend,
3008  _In_ ULONG Divisor,
3010 {
3012  ret.QuadPart = (ULONG64)Dividend.QuadPart / Divisor;
3013  if (Remainder)
3014  *Remainder = (ULONG)(Dividend.QuadPart % Divisor);
3015  return ret;
3016 }
3017 
3018 $endif (_WDMDDK_)
3019 
3020 $if (_NTDDK_)
3021 
3022 //DECLSPEC_DEPRECATED_DDK_WINXP
3027  _In_ LARGE_INTEGER Dividend,
3030 {
3032  ret.QuadPart = Dividend.QuadPart / Divisor.QuadPart;
3033  if (Remainder)
3034  Remainder->QuadPart = Dividend.QuadPart % Divisor.QuadPart;
3035  return ret;
3036 }
3037 
3038 #else
3039 
3040 #if (NTDDI_VERSION >= NTDDI_WIN2K)
3041 NTSYSAPI
3043 NTAPI
3045  _In_ LARGE_INTEGER Dividend,
3048 #endif
3049 
3050 $endif (_NTDDK_)
3051 
3052 #endif /* defined(_AMD64_) || defined(_IA64_) */
3053 
3054 $if (_WDMDDK_)
3055 
3056 #if defined(_AMD64_)
3057 
3058 #define MultiplyHigh __mulh
3059 #define UnsignedMultiplyHigh __umulh
3060 
3061 //DECLSPEC_DEPRECATED_DDK
3062 static __inline
3066  _In_ LARGE_INTEGER Dividend,
3067  _In_ LARGE_INTEGER MagicDivisor,
3068  _In_ CCHAR ShiftCount)
3069 {
3071  ULONG64 ret64;
3072  BOOLEAN Pos;
3073  Pos = (Dividend.QuadPart >= 0);
3074  ret64 = UnsignedMultiplyHigh(Pos ? Dividend.QuadPart : -Dividend.QuadPart,
3075  MagicDivisor.QuadPart);
3076  ret64 >>= ShiftCount;
3077  ret.QuadPart = Pos ? ret64 : -(LONG64)ret64;
3078  return ret;
3079 }
3080 #endif
3081 
3082 //DECLSPEC_DEPRECATED_DDK
3083 static __inline
3087  _In_ LARGE_INTEGER Addend1,
3091  ret.QuadPart = Addend1.QuadPart + Addend2.QuadPart;
3092  return ret;
3093 }
3094 
3095 /* VOID
3096  * RtlLargeIntegerAnd(
3097  * IN OUT LARGE_INTEGER Result,
3098  * IN LARGE_INTEGER Source,
3099  * IN LARGE_INTEGER Mask);
3100  */
3101 #define RtlLargeIntegerAnd(Result, Source, Mask) \
3102  Result.QuadPart = Source.QuadPart & Mask.QuadPart
3103 
3104 //DECLSPEC_DEPRECATED_DDK
3105 static __inline
3109  _In_ LARGE_INTEGER LargeInteger,
3110  _In_ CCHAR ShiftCount)
3111 {
3113  ret.QuadPart = LargeInteger.QuadPart >> ShiftCount;
3114  return ret;
3115 }
3116 
3117 /* BOOLEAN
3118  * RtlLargeIntegerEqualTo(
3119  * IN LARGE_INTEGER Operand1,
3120  * IN LARGE_INTEGER Operand2);
3121  */
3122 #define RtlLargeIntegerEqualTo(X,Y) \
3123  (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
3124 
3126 PVOID
3129  _In_ SIZE_T Size)
3130 {
3131  volatile char* vptr = (volatile char*)Pointer;
3132 #if defined(_M_AMD64)
3133  __stosb((PUCHAR)vptr, 0, Size);
3134 #else
3135  char * endptr = (char *)vptr + Size;
3136  while (vptr < endptr) {
3137  *vptr = 0; vptr++;
3138  }
3139 #endif
3140  return Pointer;
3141 }
3142 
3143 #if defined(_M_AMD64)
3146 BOOLEAN
3147 RtlCheckBit(
3148  _In_ PRTL_BITMAP BitMapHeader,
3149  _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitPosition)
3150 {
3151  return BitTest64((LONG64 CONST*)BitMapHeader->Buffer, (LONG64)BitPosition);
3152 }
3153 #else
3154 #define RtlCheckBit(BMH,BP) (((((PLONG)(BMH)->Buffer)[(BP)/32]) >> ((BP)%32)) & 0x1)
3155 #endif /* defined(_M_AMD64) */
3156 
3157 #define RtlLargeIntegerGreaterThan(X,Y) ( \
3158  (((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
3159  ((X).HighPart > (Y).HighPart) \
3160 )
3161 
3162 #define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) ( \
3163  (((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
3164  ((X).HighPart > (Y).HighPart) \
3165 )
3166 
3167 #define RtlLargeIntegerNotEqualTo(X,Y) ( \
3168  (((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)) \
3169 )
3170 
3171 #define RtlLargeIntegerLessThan(X,Y) ( \
3172  (((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
3173  ((X).HighPart < (Y).HighPart) \
3174 )
3175 
3176 #define RtlLargeIntegerLessThanOrEqualTo(X,Y) ( \
3177  (((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
3178  ((X).HighPart < (Y).HighPart) \
3179 )
3180 
3181 #define RtlLargeIntegerGreaterThanZero(X) ( \
3182  (((X).HighPart == 0) && ((X).LowPart > 0)) || \
3183  ((X).HighPart > 0 ) \
3184 )
3185 
3186 #define RtlLargeIntegerGreaterOrEqualToZero(X) ( (X).HighPart >= 0 )
3187 
3188 #define RtlLargeIntegerEqualToZero(X) ( !((X).LowPart | (X).HighPart) )
3189 
3190 #define RtlLargeIntegerNotEqualToZero(X) ( ((X).LowPart | (X).HighPart) )
3191 
3192 #define RtlLargeIntegerLessThanZero(X) ( ((X).HighPart < 0) )
3193 
3194 #define RtlLargeIntegerLessOrEqualToZero(X) ( ((X).HighPart < 0) || !((X).LowPart | (X).HighPart) )
3195 
3196 #endif /* !defined(MIDL_PASS) */
3197 
3198 /* Byte Swap Functions */
3199 #define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x))
3200 #define RtlUlongByteSwap(_x) _byteswap_ulong((_x))
3201 #define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
3202 
3203 #if defined(_MSC_VER) && !defined(__clang__)
3204 # define __assert_annotationA(msg) __annotation(L"Debug", L"AssertFail", L ## msg)
3205 # define __assert_annotationW(msg) __annotation(L"Debug", L"AssertFail", msg)
3206 #else
3207 # define __assert_annotationA(msg) \
3208  DbgPrint("Assertion failed at %s(%d): %s\n", __FILE__, __LINE__, msg)
3209 # define __assert_annotationW(msg) \
3210  DbgPrint("Assertion failed at %s(%d): %S\n", __FILE__, __LINE__, msg)
3211 #endif
3212 
3213 #ifdef _PREFAST_
3214 # define NT_ANALYSIS_ASSUME(_exp) _Analysis_assume_(_exp)
3215 #elif DBG
3216 # define NT_ANALYSIS_ASSUME(_exp) ((void)0)
3217 #else
3218 # define NT_ANALYSIS_ASSUME(_exp) __noop(_exp)
3219 #endif
3220 
3221 #define NT_ASSERT_ACTION(exp) \
3222  (NT_ANALYSIS_ASSUME(exp), \
3223  ((!(exp)) ? \
3224  (__assert_annotationA(#exp), \
3225  DbgRaiseAssertionFailure(), FALSE) : TRUE))
3226 
3227 #define NT_ASSERTMSG_ACTION(msg, exp) \
3228  (NT_ANALYSIS_ASSUME(exp), \
3229  ((!(exp)) ? \
3230  (__assert_annotationA(msg), \
3231  DbgRaiseAssertionFailure(), FALSE) : TRUE))
3232 
3233 #define NT_ASSERTMSGW_ACTION(msg, exp) \
3234  (NT_ANALYSIS_ASSUME(exp), \
3235  ((!(exp)) ? \
3236  (__assert_annotationW(msg), \
3237  DbgRaiseAssertionFailure(), FALSE) : TRUE))
3238 
3239 #if DBG
3240 
3241 #define RTL_VERIFY(exp) \
3242  ((!(exp)) ? \
3243  RtlAssert( (PVOID)#exp, (PVOID)__FILE__, __LINE__, NULL ), FALSE : TRUE)
3244 
3245 #define RTL_VERIFYMSG(msg, exp) \
3246  ((!(exp)) ? \
3247  RtlAssert( (PVOID)#exp, (PVOID)__FILE__, __LINE__, (PCHAR)msg ), FALSE : TRUE)
3248 
3249 #define RTL_SOFT_VERIFY(exp) \
3250  ((!(exp)) ? \
3251  DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n", __FILE__, __LINE__, #exp), FALSE : TRUE)
3252 
3253 #define RTL_SOFT_VERIFYMSG(msg, exp) \
3254  ((!(exp)) ? \
3255  DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n Message: %s\n", __FILE__, __LINE__, #exp, (msg)), FALSE : TRUE)
3256 
3257 /* The ASSERTs must be cast to void to avoid warnings about unused results. */
3258 #define ASSERT (void)RTL_VERIFY
3259 #define ASSERTMSG (void)RTL_VERIFYMSG
3260 #define RTL_SOFT_ASSERT (void)RTL_SOFT_VERIFY
3261 #define RTL_SOFT_ASSERTMSG (void)RTL_SOFT_VERIFYMSG
3262 
3263 #define NT_VERIFY NT_ASSERT_ACTION
3264 #define NT_VERIFYMSG NT_ASSERTMSG_ACTION
3265 #define NT_VERIFYMSGW NT_ASSERTMSGW_ACTION
3266 
3267 #define NT_ASSERT_ASSUME (void)NT_ASSERT_ACTION
3268 #define NT_ASSERTMSG_ASSUME (void)NT_ASSERTMSG_ACTION
3269 #define NT_ASSERTMSGW_ASSUME (void)NT_ASSERTMSGW_ACTION
3270 
3271 #define NT_ASSERT_NOASSUME (void)NT_ASSERT_ACTION
3272 #define NT_ASSERTMSG_NOASSUME (void)NT_ASSERTMSG_ACTION
3273 #define NT_ASSERTMSGW_NOASSUME (void)NT_ASSERTMSGW_ACTION
3274 
3275 #else /* !DBG */
3276 
3277 #define ASSERT(exp) ((void)0)
3278 #define ASSERTMSG(msg, exp) ((void)0)
3279 
3280 #define RTL_SOFT_ASSERT(exp) ((void)0)
3281 #define RTL_SOFT_ASSERTMSG(msg, exp) ((void)0)
3282 
3283 #define RTL_VERIFY(exp) ((exp) ? TRUE : FALSE)
3284 #define RTL_VERIFYMSG(msg, exp) ((exp) ? TRUE : FALSE)
3285 
3286 #define RTL_SOFT_VERIFY(exp) ((exp) ? TRUE : FALSE)
3287 #define RTL_SOFT_VERIFYMSG(msg, exp) ((exp) ? TRUE : FALSE)
3288 
3289 #define NT_VERIFY(exp) (NT_ANALYSIS_ASSUME(exp), ((exp) ? TRUE : FALSE))
3290 #define NT_VERIFYMSG(msg, exp) (NT_ANALYSIS_ASSUME(exp), ((exp) ? TRUE : FALSE))
3291 #define NT_VERIFYMSGW(msg, exp) (NT_ANALYSIS_ASSUME(exp), ((exp) ? TRUE : FALSE))
3292 
3293 #define NT_ASSERT_ASSUME(exp) (NT_ANALYSIS_ASSUME(exp), (void)0)
3294 #define NT_ASSERTMSG_ASSUME(msg, exp) (NT_ANALYSIS_ASSUME(exp), (void)0)
3295 #define NT_ASSERTMSGW_ASSUME(msg, exp) (NT_ANALYSIS_ASSUME(exp), (void)0)
3296 
3297 #define NT_ASSERT_NOASSUME(exp) ((void)0)
3298 #define NT_ASSERTMSG_NOASSUME(msg, exp) ((void)0)
3299 #define NT_ASSERTMSGW_NOASSUME(msg, exp) ((void)0)
3300 
3301 #endif /* DBG */
3302 
3303 #define NT_FRE_ASSERT (void)NT_ASSERT_ACTION
3304 #define NT_FRE_ASSERTMSG (void)NT_ASSERTMSG_ACTION
3305 #define NT_FRE_ASSERTMSGW (void)NT_ASSERTMSGW_ACTION
3306 
3307 #ifdef NT_ASSERT_ALWAYS_ASSUMES
3308 # define NT_ASSERT NT_ASSERT_ASSUME
3309 # define NT_ASSERTMSG NT_ASSERTMSG_ASSUME
3310 # define NT_ASSERTMSGW NT_ASSERTMSGW_ASSUME
3311 #else
3312 # define NT_ASSERT NT_ASSERT_NOASSUME
3313 # define NT_ASSERTMSG NT_ASSERTMSG_NOASSUME
3314 # define NT_ASSERTMSGW NT_ASSERTMSGW_NOASSUME
3315 #endif /* NT_ASSERT_ALWAYS_ASSUMES */
3316 
3317 #if defined(_MSC_VER) && (defined(__REACTOS__) || defined(ASSERT_ALWAYS_NT_ASSERT)) && !defined(_BLDR_)
3318 #undef ASSERT
3319 #define ASSERT NT_ASSERT
3320 #undef ASSERTMSG
3321 #define ASSERTMSG NT_ASSERTMSG
3322 #undef ASSERTMSGW
3323 #define ASSERTMSGW NT_ASSERTMSGW
3324 #undef RTL_VERIFY
3325 #define RTL_VERIFY NT_VERIFY
3326 #endif
3327 
3328 #define InitializeListHead32(ListHead) (\
3329  (ListHead)->Flink = (ListHead)->Blink = PtrToUlong((ListHead)))
3330 
3331 #if !defined(_WINBASE_)
3332 
3333 #if defined(_WIN64) && !defined(_NTSYSTEM_) && (defined(_NTDRIVER_) || defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) || !defined(_NTOSP_))
3334 
3336 VOID
3338  _Out_ PSLIST_HEADER SListHead);
3339 
3340 #else /* defined(_WIN64) && ... */
3341 
3342 /* HACK */
3346 VOID
3347 NTAPI
3349  _In_ NTSTATUS Status);
3350 
3352 VOID
3354  _Out_ PSLIST_HEADER SListHead)
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 }
3368 
3369 #endif /* defined(_WIN64) && ... */
3370 
3371 #ifdef _X86_
3372 
3375 FASTCALL
3377  _Inout_ PSLIST_HEADER SListHead,
3379 
3382 FASTCALL
3384  _Inout_ PSLIST_HEADER SListHead);
3385 
3386 #define InterlockedFlushSList(SListHead) \
3387  ExInterlockedFlushSList(SListHead)
3388 
3389 #else /* !_X86_ */
3390 
3391 #define InterlockedPushEntrySList(SListHead, SListEntry) \
3392  ExpInterlockedPushEntrySList(SListHead, SListEntry)
3393 
3394 #define InterlockedPopEntrySList(SListHead) \
3395  ExpInterlockedPopEntrySList(SListHead)
3396 
3397 #define InterlockedFlushSList(SListHead) \
3398  ExpInterlockedFlushSList(SListHead)
3399 
3400 #endif /* _X86_ */
3401 
3402 #define QueryDepthSList(SListHead) \
3403  ExQueryDepthSList(SListHead)
3404 
3405 #endif /* !defined(_WINBASE_) */
3406 
3407 #define RTL_CONTEXT_EX_OFFSET(ContextEx, Chunk) ((ContextEx)->Chunk.Offset)
3408 #define RTL_CONTEXT_EX_LENGTH(ContextEx, Chunk) ((ContextEx)->Chunk.Length)
3409 #define RTL_CONTEXT_EX_CHUNK(Base, Layout, Chunk) \
3410  ((PVOID)((PCHAR)(Base) + RTL_CONTEXT_EX_OFFSET(Layout, Chunk)))
3411 #define RTL_CONTEXT_OFFSET(Context, Chunk) \
3412  RTL_CONTEXT_EX_OFFSET((PCONTEXT_EX)(Context + 1), Chunk)
3413 #define RTL_CONTEXT_LENGTH(Context, Chunk) \
3414  RTL_CONTEXT_EX_LENGTH((PCONTEXT_EX)(Context + 1), Chunk)
3415 #define RTL_CONTEXT_CHUNK(Context, Chunk) \
3416  RTL_CONTEXT_EX_CHUNK((PCONTEXT_EX)(Context + 1), \
3417  (PCONTEXT_EX)(Context + 1), \
3418  Chunk)
3419 
3420 BOOLEAN
3422  _In_ ULONG Version);
3423 
3424 BOOLEAN
3426  _In_ ULONG Version);
3427 
3428 #ifndef RtlIsNtDdiVersionAvailable
3429 #define RtlIsNtDdiVersionAvailable WdmlibRtlIsNtDdiVersionAvailable
3430 #endif
3431 
3432 #ifndef RtlIsServicePackVersionInstalled
3433 #define RtlIsServicePackVersionInstalled WdmlibRtlIsServicePackVersionInstalled
3434 #endif
3435 
3436 #define RtlInterlockedSetBits(Flags, Flag) \
3437  InterlockedOr((PLONG)(Flags), Flag)
3438 
3439 #define RtlInterlockedAndBits(Flags, Flag) \
3440  InterlockedAnd((PLONG)(Flags), Flag)
3441 
3442 #define RtlInterlockedClearBits(Flags, Flag) \
3443  RtlInterlockedAndBits(Flags, ~(Flag))
3444 
3445 #define RtlInterlockedXorBits(Flags, Flag) \
3446  InterlockedXor(Flags, Flag)
3447 
3448 #define RtlInterlockedSetBitsDiscardReturn(Flags, Flag) \
3449  (VOID) RtlInterlockedSetBits(Flags, Flag)
3450 
3451 #define RtlInterlockedAndBitsDiscardReturn(Flags, Flag) \
3452  (VOID) RtlInterlockedAndBits(Flags, Flag)
3453 
3454 #define RtlInterlockedClearBitsDiscardReturn(Flags, Flag) \
3455  RtlInterlockedAndBitsDiscardReturn(Flags, ~(Flag))
3456 
3458 
3459 $if (_NTDDK_)
3460 
3461 #ifdef RTL_USE_AVL_TABLES
3462 
3463 #define RtlInitializeGenericTable RtlInitializeGenericTableAvl
3464 #define RtlInsertElementGenericTable RtlInsertElementGenericTableAvl
3465 #define RtlInsertElementGenericTableFull RtlInsertElementGenericTableFullAvl
3466 #define RtlDeleteElementGenericTable RtlDeleteElementGenericTableAvl
3467 #define RtlLookupElementGenericTable RtlLookupElementGenericTableAvl
3468 #define RtlLookupElementGenericTableFull RtlLookupElementGenericTableFullAvl
3469 #define RtlEnumerateGenericTable RtlEnumerateGenericTableAvl
3470 #define RtlEnumerateGenericTableWithoutSplaying RtlEnumerateGenericTableWithoutSplayingAvl
3471 #define RtlGetElementGenericTable RtlGetElementGenericTableAvl
3472 #define RtlNumberGenericTableElements RtlNumberGenericTableElementsAvl
3473 #define RtlIsGenericTableEmpty RtlIsGenericTableEmptyAvl
3474 
3475 #endif /* RTL_USE_AVL_TABLES */
3476 
3477 #define RtlInitializeSplayLinks(Links) { \
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 }
3539 
3541 LUID
3544  _In_ ULONG Val)
3545 {
3546  LUID Luid;
3547 
3548  Luid.LowPart = Val;
3549  Luid.HighPart = 0;
3550  return Luid;
3551 }
3552 
3553 #endif /* !defined(MIDL_PASS) */
3554 
3555 #if (defined(_M_AMD64) || defined(_M_IA64)) && !defined(_REALLY_GET_CALLERS_CALLER_)
3556 #define RtlGetCallersAddress(CallersAddress, CallersCaller) \
3557  *CallersAddress = (PVOID)_ReturnAddress(); \
3558  *CallersCaller = NULL;
3559 #else
3560 #if (NTDDI_VERSION >= NTDDI_WIN2K)
3561 NTSYSAPI
3562 VOID
3563 NTAPI
3565  _Out_ PVOID *CallersAddress,
3566  _Out_ PVOID *CallersCaller);
3567 #endif
3568 #endif
3569 
3570 #if !defined(MIDL_PASS) && !defined(SORTPP_PASS)
3571 
3572 #if (NTDDI_VERSION >= NTDDI_WIN7)
3573 
3575 VOID
3576 NTAPI
3579 {
3580  Context->ChainHead = NULL;
3581  Context->PrevLinkage = NULL;
3582 }
3583 
3585 VOID
3586 NTAPI
3590 {
3591  Context->ChainHead = Enumerator->ChainHead;
3592  Context->PrevLinkage = Enumerator->HashEntry.Linkage.Blink;
3593 }
3594 
3596 VOID
3597 NTAPI
3600 {
3602  return;
3603 }
3604 
3606 ULONG
3607 NTAPI
3610 {
3611  return HashTable->TableSize;
3612 }
3613 
3615 ULONG
3616 NTAPI
3619 {
3620  return HashTable->NonEmptyBuckets;
3621 }
3622 
3624 ULONG
3625 NTAPI
3628 {
3629  return HashTable->TableSize - HashTable->NonEmptyBuckets;
3630 }
3631 
3633 ULONG
3634 NTAPI
3637 {
3638  return HashTable->NumEntries;
3639 }
3640 
3642 ULONG
3643 NTAPI
3646 {
3647  return HashTable->NumEnumerators;
3648 }
3649 
3650 #endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
3651 
3652 #endif /* !defined(MIDL_PASS) && !defined(SORTPP_PASS) */
3653 
3654 $endif (_NTDDK_)
3655 $if (_NTIFS_)
3656 
3657 #define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE 1
3658 #define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING 2
3659 
3660 #define RtlUnicodeStringToOemSize(STRING) (NLS_MB_OEM_CODE_PAGE_TAG ? \
3661  RtlxUnicodeStringToOemSize(STRING) : \
3662  ((STRING)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
3663 )
3664 
3665 #define RtlOemStringToUnicodeSize(STRING) ( \
3666  NLS_MB_OEM_CODE_PAGE_TAG ? \
3667  RtlxOemStringToUnicodeSize(STRING) : \
3668  ((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
3669 )
3670 
3671 #define RtlOemStringToCountedUnicodeSize(STRING) ( \
3672  (ULONG)(RtlOemStringToUnicodeSize(STRING) - sizeof(UNICODE_NULL)) \
3673 )
3674 
3675 #define RtlOffsetToPointer(B,O) ((PCHAR)(((PCHAR)(B)) + ((ULONG_PTR)(O))))
3676 #define RtlPointerToOffset(B,P) ((ULONG)(((PCHAR)(P)) - ((PCHAR)(B))))
3677 $endif (_NTIFS_)
struct _LARGE_INTEGER::@2220 u
_Notnull_ __drv_aliasesMem PWSTR Buffer
Definition: rtlfuncs.h:2978
NTSYSAPI PRTL_SPLAY_LINKS NTAPI RtlSplay(_Inout_ PRTL_SPLAY_LINKS Links)
_In_ PWSTR Path
Definition: rtlfuncs.h:3971
_When_(Status< 0, _Out_range_(>, 0)) _When_(Status >=0
__analysis_noreturn NTSYSAPI VOID NTAPI RtlAssert(_In_ PVOID FailedAssertion, _In_ PVOID FileName, _In_ ULONG LineNumber, _In_opt_z_ PSTR Message)
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
signed char * PCHAR
Definition: retypes.h:7
static __inline LARGE_INTEGER NTAPI_INLINE RtlConvertUlongToLargeInteger(_In_ ULONG UnsignedInteger)
Definition: rtlfuncs.h:2851
NTSTATUS NTAPI RtlUnicodeToUTF8N(CHAR *utf8_dest, ULONG utf8_bytes_max, ULONG *utf8_bytes_written, const WCHAR *uni_src, ULONG uni_bytes)
Definition: rtl.c:17
NTSYSAPI ULONG NTAPI RtlRandom(_Inout_ PULONG Seed)
CONST WCHAR * PCWCH
Definition: ntbasedef.h:418
CONST char * PCSZ
Definition: umtypes.h:125
NTSYSAPI PVOID NTAPI RtlLookupElementGenericTableFull(_In_ PRTL_GENERIC_TABLE Table, _In_ PVOID Buffer, _Out_ PVOID *NodeOrParent, _Out_ TABLE_SEARCH_RESULT *SearchResult)
FORCEINLINE VOID NTAPI RtlReleaseHashTableContext(_Inout_ PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context)
Definition: rtlfuncs.h:3598
NTSYSAPI ULONG WINAPI RtlNtStatusToDosErrorNoTeb(NTSTATUS)
NTSYSAPI VOID NTAPI RtlUpperString(PSTRING DestinationString, PSTRING SourceString)
_Must_inspect_result_ NTSYSAPI PVOID NTAPI RtlEnumerateGenericTableWithoutSplaying(_In_ PRTL_GENERIC_TABLE Table, _Inout_ PVOID *RestartKey)
_In_ SIZE_T String1Length
Definition: rtlfuncs.h:513
RTL_GENERIC_COMPARE_ROUTINE * PRTL_GENERIC_COMPARE_ROUTINE
Definition: rtltypes.h:448
NTSYSAPI LONGLONG WINAPI RtlLargeIntegerAdd(LONGLONG, LONGLONG)
NTSYSAPI VOID NTAPI RtlGetCallersAddress(_Out_ PVOID *CallersAddress, _Out_ PVOID *CallersCaller)
Definition: except.c:22
*BytesInOemString PCHAR OemString
Definition: rtlfuncs.h:1561
NTSYSAPI BOOLEAN NTAPI RtlValidSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
Definition: sd.c:1055
_In_ ULONG TypeMask
Definition: rtlfuncs.h:4464
_In_ LARGE_INTEGER Addend2
Definition: rtlfuncs.h:3089
static PWSTR GuidString
Definition: apphelp.c:91
#define _Pre_unknown_
Definition: no_sal2.h:535
const uint16_t * PCWSTR
Definition: typedefs.h:55
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
Definition: rtlfuncs.h:4004
#define IN
Definition: typedefs.h:38
return
Definition: dirsup.c:529
FORCEINLINE ULONG NTAPI RtlActiveEnumeratorsHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
Definition: rtlfuncs.h:3644
RTL_AVL_COMPARE_ROUTINE * PRTL_AVL_COMPARE_ROUTINE
Definition: rtltypes.h:381
FORCEINLINE VOID RtlpCheckListEntry(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:95
Definition: rtltypes.h:505
#define _In_opt_z_
Definition: no_sal2.h:221
ASMGENDATA Table[]
Definition: genincdata.c:61
#define _Must_inspect_result_
Definition: no_sal2.h:314
_Out_ PLARGE_INTEGER Time
Definition: rtlfuncs.h:4426
_In_opt_ PSID _In_opt_ BOOLEAN OwnerDefaulted
Definition: rtlfuncs.h:1630
*UnicodeStringActualByteCount PWSTR _In_ ULONG UnicodeStringMaxByteCount
Definition: rtlfuncs.h:2661
_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)
_In_ __drv_aliasesMem PSTRING Prefix
Definition: rtlfuncs.h:1631
NTSYSAPI ULONG NTAPI RtlWalkFrameChain(_Out_writes_(Count -(Flags >> RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT)) PVOID *Callers, _In_ ULONG Count, _In_ ULONG Flags)
NTSYSAPI ULONG64 NTAPI RtlGetEnabledExtendedFeatures(IN ULONG64 FeatureMask)
_In_ ULONG _Out_writes_bytes_all_(Length) PUCHAR Buffer
Definition: ntddpcm.h:100
RTL_GENERIC_ALLOCATE_ROUTINE * PRTL_GENERIC_ALLOCATE_ROUTINE
Definition: rtltypes.h:457
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
NTSYSAPI VOID NTAPI RtlDeleteNoSplay(_In_ PRTL_SPLAY_LINKS Links, _Inout_ PRTL_SPLAY_LINKS *Root)
#define _Notnull_
Definition: no_sal2.h:316
NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP, PULONG, ULONG)
Definition: hash.c:67
#define _Post_invalid_
Definition: no_sal2.h:457
_In_ PCWSTR _In_ LONG _Out_writes_to_ DestinationStringLength PWSTR _Inout_ PLONG DestinationStringLength
Definition: rtlfuncs.h:2577
_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)
NTSYSAPI VOID NTAPI RtlSetBits(_In_ PRTL_BITMAP BitMapHeader, _In_range_(0, BitMapHeader->SizeOfBitMap - NumberToSet) ULONG StartingIndex, _In_range_(0, BitMapHeader->SizeOfBitMap - StartingIndex) ULONG NumberToSet)
Definition: bitmap.c:374
NTSYSAPI VOID NTAPI RtlDeleteHashTable(_In_ _When_((HashTable->Flags &RTL_HASH_ALLOCATED_HEADER), __drv_freesMem(Mem) _Post_invalid_) PRTL_DYNAMIC_HASH_TABLE HashTable)
NTSYSAPI NTSTATUS NTAPI RtlSetGroupSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSID Group, IN BOOLEAN GroupDefaulted)
Definition: sd.c:410
_In_ __inner_callback PRTL_RUN_ONCE_INIT_FN InitFn
Definition: rtlfuncs.h:2535
NTSYSAPI NTSTATUS WINAPI RtlInt64ToUnicodeString(ULONGLONG, ULONG, UNICODE_STRING *)
#define SECURITY_MAX_SID_SIZE
Definition: setypes.h:458
NTSTATUS NTAPI RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
Definition: version.c:158
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptorRelative(_Out_ PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor, _In_ ULONG Revision)
NTSYSAPI LONG NTAPI RtlCompareString(PSTRING String1, PSTRING String2, BOOLEAN CaseInSensitive)
Type
Definition: Type.h:6
NTSYSAPI NTSTATUS WINAPI RtlDeleteRegistryValue(ULONG, PCWSTR, PCWSTR)
_Inout_opt_ POEM_STRING _Out_opt_ PBOOLEAN NameContainsSpaces
Definition: rtlfuncs.h:2977
_Success_(return!=FALSE) NTSYSAPI BOOLEAN NTAPI RtlIsValidIndexHandle(_In_ PRTL_HANDLE_TABLE HandleTable
Definition: mapping.c:279
_Must_inspect_result_ NTSYSAPI SIZE_T NTAPI RtlCompareMemoryUlong(_In_reads_bytes_(Length) PVOID Source, _In_ SIZE_T Length, _In_ ULONG Pattern)
_In_ BOOLEAN _In_opt_ PACL _In_opt_ BOOLEAN DaclDefaulted
Definition: rtlfuncs.h:1595
BOOLEAN NTAPI RtlIsValidOemCharacter(IN PWCHAR Char)
Definition: unicode.c:514
struct _Entry Entry
Definition: kefuncs.h:640
Definition: scsiwmi.h:51
NTSYSAPI BOOLEAN NTAPI RtlExpandHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
NTSTATUS NTAPI RtlDescribeChunk(IN USHORT CompressionFormat, IN OUT PUCHAR *CompressedBuffer, IN PUCHAR EndOfCompressedBufferPlus1, OUT PUCHAR *ChunkBuffer, OUT PULONG ChunkSize)
Definition: compress.c:389
static __inline LARGE_INTEGER NTAPI_INLINE RtlLargeIntegerSubtract(_In_ LARGE_INTEGER Minuend, _In_ LARGE_INTEGER Subtrahend)
Definition: rtlfuncs.h:2918
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY ListEnd
Definition: exfuncs.h:1015
Definition: ntbasedef.h:635
static __inline ULONG NTAPI_INLINE RtlEnlargedUnsignedDivide(_In_ ULARGE_INTEGER Dividend, _In_ ULONG Divisor, _Out_opt_ PULONG Remainder)
Definition: rtlfuncs.h:2891
#define MAXLONG
Definition: umtypes.h:116
NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR)
#define RtlUlonglongByteSwap(_x)
Definition: rtlfuncs.h:3201
#define _Out_writes_bytes_to_opt_(size, count)
Definition: no_sal2.h:375
NTSYSAPI ULONG NTAPI RtlNumberGenericTableElements(_In_ PRTL_GENERIC_TABLE Table)
return ret
Definition: rtlfuncs.h:3092
NTSYSAPI ULONG NTAPI RtlNumberOfClearBits(_In_ PRTL_BITMAP BitMapHeader)
Definition: bitmap.c:500
NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR, DWORD, LPDWORD, LPCSTR, DWORD)
* PSID_IDENTIFIER_AUTHORITY
Definition: setypes.h:436
_Ret_range_(<, MAXLONG) NTSYSAPI ULONG NTAPI RtlRandom(_Inout_ PULONG Seed)
BOOLEAN NTAPI RtlTimeToSecondsSince1970(PLARGE_INTEGER Time, PULONG ElapsedSeconds)
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:182
#define RtlUshortByteSwap(_x)
Definition: rtlfuncs.h:3199
_In_opt_ PVOID _In_opt_ SIZE_T _In_opt_ SIZE_T _In_opt_ PVOID Lock
Definition: rtlfuncs.h:2169
_Must_inspect_result_ NTSYSAPI PRTL_SPLAY_LINKS NTAPI RtlSubtreeSuccessor(_In_ PRTL_SPLAY_LINKS Links)
_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 VOID NTAPI RtlSecondsSince1970ToTime(_In_ ULONG SecondsSince1970, _Out_ PLARGE_INTEGER Time)
uint16_t * PWSTR
Definition: typedefs.h:54
struct _LIST_ENTRY * Blink
Definition: typedefs.h:120
FORCEINLINE VOID InsertHeadList(_Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY Entry)
Definition: rtlfuncs.h:201
NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING, PCSZ)
NTSYSAPI BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP, ULONG, ULONG)
NTSYSAPI BOOLEAN NTAPI RtlDeleteElementGenericTableAvl(_In_ PRTL_AVL_TABLE Table, _In_ PVOID Buffer)
_In_ BOOLEAN _In_ ULONG HashAlgorithm
Definition: rtlfuncs.h:2039
NTSYSAPI PVOID NTAPI RtlFreeSid(_In_ _Post_invalid_ PSID Sid)
VOID NTAPI RtlRemoveUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable, PUNICODE_PREFIX_TABLE_ENTRY PrefixTableEntry)
_In_opt_ PSID Group
Definition: rtlfuncs.h:1606
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE _In_opt_ PVOID _In_opt_ PVOID Environment
Definition: rtlfuncs.h:4004
_In_ __drv_aliasesMem PSTRING _Out_ PPREFIX_TABLE_ENTRY PrefixTableEntry
Definition: rtlfuncs.h:1631
unsigned char * PUCHAR
Definition: retypes.h:3
char CHAR
Definition: xmlstorage.h:175
FORCEINLINE PLIST_ENTRY RemoveTailList(_Inout_ PLIST_ENTRY ListHead)
Definition: rtlfuncs.h:154
_In_ PCWSTR _In_z_ PCWSTR _In_ ULONG ValueType
Definition: rtlfuncs.h:4016
NTSYSAPI ULONGLONG NTAPI RtlCmDecodeMemIoResource(_In_ struct _CM_PARTIAL_RESOURCE_DESCRIPTOR *Descriptor, _Out_opt_ PULONGLONG Start)
enum _TABLE_SEARCH_RESULT TABLE_SEARCH_RESULT
NTSYSAPI LONG NTAPI RtlCompareUnicodeString(PCUNICODE_STRING String1, PCUNICODE_STRING String2, BOOLEAN CaseInsensitive)
Definition: string_lib.cpp:31
NTSYSAPI NTSTATUS NTAPI RtlUnicodeToMultiByteSize(PULONG MbSize, PCWCH UnicodeString, ULONG UnicodeSize)
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ NTSYSAPI PVOID NTAPI RtlEnumerateGenericTable(_In_ PRTL_GENERIC_TABLE Table, _In_ BOOLEAN Restart)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
NTSYSAPI NTSTATUS NTAPI RtlFindClosestEncodableLength(_In_ ULONGLONG SourceLength, _Out_ PULONGLONG TargetLength)
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2343
ush Pos
Definition: deflate.h:92
VOID NTAPI RtlFreeOemString(POEM_STRING OemString)
_In_ ULONG MaxBytesInCustomCPString
Definition: rtlfuncs.h:1958
NTSYSAPI BOOLEAN WINAPI RtlTimeToSecondsSince1980(const LARGE_INTEGER *, LPDWORD)
NTSYSAPI VOID NTAPI RtlSetBit(_In_ PRTL_BITMAP BitMapHeader, _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber)
Definition: bitmap.c:304
#define _NTIFS_
Definition: ifssupp.h:20
_In_ PCWSTR _In_ LONG SourceStringLength
Definition: rtlfuncs.h:2575
#define _Outptr_
Definition: no_sal2.h:396
_In_ BOOLEAN _In_ ULONG _Out_ PULONG HashValue
Definition: rtlfuncs.h:2039
NTSYSAPI PVOID NTAPI RtlLookupElementGenericTableFullAvl(_In_ PRTL_AVL_TABLE Table, _In_ PVOID Buffer, _Out_ PVOID *NodeOrParent, _Out_ TABLE_SEARCH_RESULT *SearchResult)
static __inline LARGE_INTEGER NTAPI_INLINE RtlLargeIntegerNegate(_In_ LARGE_INTEGER Subtrahend)
Definition: rtlfuncs.h:2905
#define RtlCopyMemoryNonTemporal
Definition: rtlfuncs.h:293
#define ExRaiseStatus
Definition: ntoskrnl.h:96
NTSYSAPI NTSTATUS NTAPI RtlIdnToAscii(_In_ ULONG Flags, _In_ PCWSTR SourceString, _In_ LONG SourceStringLength, _Out_writes_to_(*DestinationStringLength, *DestinationStringLength) PWSTR DestinationString, _Inout_ PLONG DestinationStringLength)
#define _Const_
Definition: no_sal2.h:18
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)
NTSTATUS WINAPI RtlUTF8ToUnicodeN(PWSTR uni_dest, ULONG uni_bytes_max, PULONG uni_bytes_written, PCCH utf8_src, ULONG utf8_bytes)
Definition: reactos.cpp:21
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
unsigned short Length
Definition: sprintf.c:451
#define _WDMDDK_
Definition: wdm.template.h:26
NTSYSAPI PULONG NTAPI RtlSubAuthoritySid(_In_ PSID Sid, _In_ ULONG SubAuthority)
NTSTATUS NTAPI RtlOemStringToCountedUnicodeString(IN OUT PUNICODE_STRING UniDest, IN PCOEM_STRING OemSource, IN BOOLEAN AllocateDestinationString)
Definition: unicode.c:1463
NTSYSAPI LONG WINAPI RtlCompareUnicodeStrings(const WCHAR *, SIZE_T, const WCHAR *, SIZE_T, BOOLEAN)
#define RtlCheckBit(BMH, BP)
Definition: rtlfuncs.h:3154
NTSYSAPI NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR, DWORD, LPDWORD, LPCSTR, DWORD)
NTSYSAPI VOID NTAPI RtlSetAllBits(_In_ PRTL_BITMAP BitMapHeader)
Definition: bitmap.c:283
NTSYSAPI ULONG NTAPI RtlFindNextForwardRunClear(_In_ PRTL_BITMAP BitMapHeader, _In_ ULONG FromIndex, _Out_ PULONG StartingRunIndex)
VOID NTAPI RtlInitializeUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable)
_Must_inspect_result_ NTSYSAPI PVOID NTAPI RtlEnumerateGenericTableWithoutSplayingAvl(_In_ PRTL_AVL_TABLE Table, _Inout_ PVOID *RestartKey)
_Out_writes_bytes_to_opt_ BufferLength PSECURITY_DESCRIPTOR _Inout_ PULONG BufferLength
Definition: rtlfuncs.h:1094
NTSYSAPI NTSTATUS NTAPI RtlGetGroupSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PSID *Group, _Out_ PBOOLEAN GroupDefaulted)
NTSYSAPI NTSTATUS NTAPI RtlGetAce(PACL Acl, ULONG AceIndex, PVOID *Ace)
_In_ PRTL_GENERIC_COMPARE_ROUTINE _In_ PRTL_GENERIC_ALLOCATE_ROUTINE _In_ PRTL_GENERIC_FREE_ROUTINE _In_opt_ PVOID TableContext
Definition: rtlfuncs.h:1089
static WCHAR String[]
Definition: stringtable.c:55
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
$endif(_WDMDDK_) $if(_WDMDDK_) _Must_inspect_result_ NTSYSAPI BOOLEAN NTAPI RtlAreBitsClear(_In_ PRTL_BITMAP BitMapHeader
Definition: rtlfuncs.h:3457
_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)
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PCUNICODE_STRING String1, PCUNICODE_STRING String2, BOOLEAN CaseInsensitive)
uint16_t * PWCHAR
Definition: typedefs.h:54
__drv_allocatesMem(Mem)) PRTL_DYNAMIC_HASH_TABLE *HashTable
Definition: exfuncs.h:1268
_In_ PVOID Parameter
Definition: ldrtypes.h:241
VOID NTAPI PfxRemovePrefix(IN PPREFIX_TABLE PrefixTable, IN PPREFIX_TABLE_ENTRY PrefixTableEntry)
Definition: prefix.c:34
NTSYSAPI LONGLONG WINAPI RtlExtendedMagicDivide(LONGLONG, LONGLONG, INT)
NTSYSAPI VOID NTAPI RtlCopyString(_Out_ PSTRING DestinationString, _In_opt_ const STRING *SourceString)
NTSYSAPI BOOLEAN NTAPI RtlEqualString(PSTRING String1, PSTRING String2, BOOLEAN CaseInSensitive)
NTSYSAPI VOID NTAPI RtlCaptureContext(_Out_ PCONTEXT ContextRecord)
NTSYSAPI void WINAPI RtlCopyLuid(PLUID, const LUID *)
#define RtlIsServicePackVersionInstalled
Definition: rtlfuncs.h:3433
NTSYSAPI WCHAR NTAPI RtlUpcaseUnicodeChar(WCHAR Source)
#define FASTCALL
Definition: nt_native.h:50
#define NTSYSAPI
Definition: ntoskrnl.h:14
#define _Out_writes_to_(size, count)
Definition: no_sal2.h:378
_In_ ULONG SecurityDescriptorLength
Definition: rtlfuncs.h:1674
_In_ ULONG Revision
Definition: rtlfuncs.h:1104
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL, DWORD, DWORD, PSID)
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:176
VOID NTAPI RtlInitializeGenericTable(IN PRTL_GENERIC_TABLE Table, IN PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine, IN PRTL_GENERIC_ALLOCATE_ROUTINE AllocateRoutine, IN PRTL_GENERIC_FREE_ROUTINE FreeRoutine, IN PVOID TableContext)
Definition: generictable.c:100
$if(_WDMDDK_) DECLSPEC_NORETURN FORCEINLINE VOID RtlFailFast(_In_ ULONG Code)
Definition: rtlfuncs.h:5
_In_ BOOLEAN DaclPresent
Definition: rtlfuncs.h:1595
#define _In_opt_
Definition: no_sal2.h:213
static BOOL Set
Definition: pageheap.c:10
NTSYSAPI CCHAR WINAPI RtlFindLeastSignificantBit(ULONGLONG)
Definition: bitmap.c:235
NTSYSAPI ULONG NTAPI RtlxUnicodeStringToAnsiSize(IN PCUNICODE_STRING UnicodeString)
Definition: unicode.c:2163
NTSYSAPI NTSTATUS NTAPI RtlGetDaclSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN DaclPresent, _Out_ PACL *Dacl, _Out_ PBOOLEAN DaclDefaulted)
_In_ ULONG _In_ ULONG HintIndex
Definition: rtlfuncs.h:609
NTSYSAPI LARGE_INTEGER NTAPI RtlExtendedIntegerMultiply(_In_ LARGE_INTEGER Multiplicand, _In_ LONG Multiplier)
_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
Definition: rtlfuncs.h:1559
NTSYSAPI BOOLEAN NTAPI RtlInitWeakEnumerationHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _Out_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
NTSYSAPI NTSTATUS NTAPI RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision)
NTSYSAPI NTSTATUS NTAPI RtlCharToInteger(PCSZ String, ULONG Base, PULONG Value)
Definition: unicode.c:261
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
uint32_t ULONG_PTR
Definition: typedefs.h:63
NTSYSAPI ULONG NTAPI RtlxOemStringToUnicodeSize(IN PCOEM_STRING OemString)
Definition: unicode.c:2110
_Must_inspect_result_ NTSYSAPI PRTL_SPLAY_LINKS NTAPI RtlSubtreePredecessor(_In_ PRTL_SPLAY_LINKS Links)
#define _Post_writable_byte_size_(size)
Definition: no_sal2.h:467
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:105
#define _Out_writes_(size)
Definition: no_sal2.h:367
FORCEINLINE ULONG NTAPI RtlTotalEntriesHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
Definition: rtlfuncs.h:3635
NTSYSAPI VOID NTAPI RtlClearAllBits(_In_ PRTL_BITMAP BitMapHeader)
Definition: bitmap.c:272
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: bitmap.c:314
#define RTLVERLIB_DDI(x)
Definition: rtltypes.h:222
FORCEINLINE VOID PushEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY Entry)
Definition: rtlfuncs.h:253
NTSYSAPI ULONG NTAPI RtlNumberOfSetBits(_In_ PRTL_BITMAP BitMapHeader)
Definition: bitmap.c:474
PPREFIX_TABLE_ENTRY NTAPI PfxFindPrefix(IN PPREFIX_TABLE PrefixTable, IN PSTRING FullName)
Definition: prefix.c:42
ULONG CLONG
Definition: umtypes.h:126
FORCEINLINE ULONG NTAPI RtlNonEmptyBucketsHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
Definition: rtlfuncs.h:3617
#define RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT
Definition: rtlfuncs.h:1177
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
NTSYSAPI NTSTATUS NTAPI RtlInitializeSid(IN OUT PSID Sid, IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount)
NTSYSAPI NTSTATUS WINAPI RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR, PDWORD, PACL, PDWORD, PACL, PDWORD, PSID, PDWORD, PSID, PDWORD)
NTSYSAPI NTSTATUS NTAPI RtlGetOwnerSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PSID *Owner, _Out_ PBOOLEAN OwnerDefaulted)
NTSYSAPI NTSTATUS WINAPI RtlDecompressBuffer(USHORT, PUCHAR, ULONG, PUCHAR, ULONG, PULONG)
_In_ ULONG _In_ ULONG _Out_ PULONG FinalUncompressedSize
Definition: rtlfuncs.h:3170
void * Buffer
Definition: sprintf.c:453
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)
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ ULONG NumberToFind
Definition: rtlfuncs.h:609
_In_opt_ PVOID _In_opt_ SIZE_T _In_opt_ SIZE_T CommitSize
Definition: rtlfuncs.h:2169
NTSYSAPI LONG NTAPI RtlCompareAltitudes(_In_ PCUNICODE_STRING Altitude1, _In_ PCUNICODE_STRING Altitude2)
NTSYSAPI VOID NTAPI RtlSecondsSince1980ToTime(_In_ ULONG ElapsedSeconds, _Out_ PLARGE_INTEGER Time)
_Inout_ PUCHAR _In_ PUCHAR _Out_ PUCHAR _Out_ PULONG ChunkSize
Definition: rtlfuncs.h:2276
_Inout_ PUCHAR * CompressedBuffer
Definition: rtlfuncs.h:2276
#define RtlIsNtDdiVersionAvailable
Definition: rtlfuncs.h:3429
NTSYSAPI NTSTATUS NTAPI RtlUnicodeToOemN(PCHAR OemString, ULONG OemSize, PULONG ResultSize, PCWCH UnicodeString, ULONG UnicodeSize)
_In_ PSID OldSid
Definition: rtlfuncs.h:2815
long LONG
Definition: pedump.c:60
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
NTSYSAPI CHAR NTAPI RtlUpperChar(CHAR Source)
*BytesInMultiByteString PCHAR _In_ ULONG MaxBytesInMultiByteString
Definition: rtlfuncs.h:1528
_In_ const STRING _In_ BOOLEAN CaseInSensitive
Definition: rtlfuncs.h:2292
_In_ PSID SourceSid
Definition: rtlfuncs.h:1333
_In_ PRTL_GENERIC_COMPARE_ROUTINE CompareRoutine
Definition: rtlfuncs.h:1089
NTSTATUS NTAPI RtlCustomCPToUnicodeN(IN PCPTABLEINFO CustomCP, OUT PWCHAR UnicodeString, IN ULONG UnicodeSize, OUT PULONG ResultSize OPTIONAL, IN PCHAR CustomString, IN ULONG CustomSize)
Definition: nls.c:45
RTL_GENERIC_FREE_ROUTINE * PRTL_GENERIC_FREE_ROUTINE
Definition: rtltypes.h:465
NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeStringToOemString(POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI NTSTATUS NTAPI RtlCreateServiceSid(_In_ PUNICODE_STRING ServiceName, _Out_writes_bytes_opt_(*ServiceSidLength) PSID ServiceSid, _Inout_ PULONG ServiceSidLength)
NTSYSAPI PUCHAR NTAPI RtlSubAuthorityCountSid(_In_ PSID Sid)
Definition: rtltypes.h:617
_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 NTSTATUS NTAPI RtlAbsoluteToSelfRelativeSD(IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor, IN OUT PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor, IN PULONG BufferLength)
Definition: sd.c:626
_Out_ PBOOLEAN SaclPresent
Definition: rtlfuncs.h:2415
#define __drv_aliasesMem
Definition: btrfs_drv.h:189
CHAR * PCH
Definition: ntbasedef.h:398
NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAceEx(PACL, DWORD, DWORD, DWORD, PSID)
Definition: card.h:12
NTSYSAPI PVOID NTAPI RtlInsertElementGenericTableAvl(_In_ PRTL_AVL_TABLE Table, _In_reads_bytes_(BufferSize) PVOID Buffer, _In_ CLONG BufferSize, _Out_opt_ PBOOLEAN NewElement)
NTSYSAPI NTSTATUS NTAPI RtlValidateUnicodeString(_In_ ULONG Flags, _In_ PCUNICODE_STRING String)
_Out_writes_bytes_to_(UncompressedBufferSize, *FinalUncompressedSize) PUCHAR UncompressedBuffer
NTSYSAPI VOID NTAPI RtlTimeToTimeFields(PLARGE_INTEGER Time, PTIME_FIELDS TimeFields)
unsigned char BOOLEAN
#define _Out_writes_bytes_opt_(a)
Definition: btrfs_drv.h:193
NTSYSAPI ULONGLONG WINAPI RtlLargeIntegerDivide(ULONGLONG, ULONGLONG, ULONGLONG *)
_In_ ULONG _In_ SECURITY_INFORMATION RequiredInformation
Definition: rtlfuncs.h:1674
NTSYSAPI NTSTATUS NTAPI RtlGetCompressionWorkSpaceSize(_In_ USHORT CompressionFormatAndEngine, _Out_ PULONG CompressBufferWorkSpaceSize, _Out_ PULONG CompressFragmentWorkSpaceSize)
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1869
smooth NULL
Definition: ftsmooth.c:416
static WCHAR Address[46]
Definition: ping.c:68
_In_ ULONG _Out_opt_ PULONG _In_ ULONG BytesInCustomCPString
Definition: rtlfuncs.h:1949
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PCANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN)
#define FORCEINLINE
Definition: ntbasedef.h:221
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
#define _Out_
Definition: no_sal2.h:323
NTSTATUS NTAPI RtlCompressChunks(IN PUCHAR UncompressedBuffer, IN ULONG UncompressedBufferSize, OUT PUCHAR CompressedBuffer, IN ULONG CompressedBufferSize, IN OUT PCOMPRESSED_DATA_INFO CompressedDataInfo, IN ULONG CompressedDataInfoLength, IN PVOID WorkSpace)
Definition: compress.c:310
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
Definition: rtlfuncs.h:1104
NTSYSAPI LARGE_INTEGER NTAPI RtlExtendedLargeIntegerDivide(_In_ LARGE_INTEGER Dividend, _In_ ULONG Divisor, _Out_opt_ PULONG Remainder)
_In_ PGENERIC_MAPPING GenericMapping
Definition: rtlfuncs.h:1262
FORCEINLINE PLIST_ENTRY RemoveHeadList(_Inout_ PLIST_ENTRY ListHead)
Definition: rtlfuncs.h:128
NTSYSAPI BOOLEAN NTAPI RtlContractHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
#define NTKERNELAPI
NTSYSAPI NTSTATUS NTAPI RtlCreateRegistryKey(_In_ ULONG RelativeTo, _In_ PWSTR Path)
_Out_ _At_(DestinationString->Buffer, __drv_allocatesMem(Mem))) _When_(!AllocateDestinationString
_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
Definition: rtlfuncs.h:1555
_In_ const STRING _In_ BOOLEAN CaseInsensitive
Definition: rtlfuncs.h:2261
_In_ PRTL_GENERIC_COMPARE_ROUTINE _In_ PRTL_GENERIC_ALLOCATE_ROUTINE _In_ PRTL_GENERIC_FREE_ROUTINE FreeRoutine
Definition: rtlfuncs.h:1089
Definition: bufpool.h:45
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
Definition: sid.c:150
_IRQL_requires_max_(APC_LEVEL) _When_(Status< 0
_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)
#define __inner_callback
Definition: sal.h:2636
NTSYSAPI NTSTATUS WINAPI RtlAppendStringToString(STRING *, const STRING *)
NTSYSAPI ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP, ULONG, ULONG)
NTSYSAPI BOOLEAN NTAPI RtlValidSid(IN PSID Sid)
Definition: sid.c:21
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PCUNICODE_STRING SourceString)
FORCEINLINE VOID NTAPI RtlInitHashTableContext(_Inout_ PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context)
Definition: rtlfuncs.h:3577
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)
static __inline LARGE_INTEGER NTAPI_INLINE RtlLargeIntegerShiftRight(_In_ LARGE_INTEGER LargeInteger, _In_ CCHAR ShiftCount)
Definition: rtlfuncs.h:2877
_In_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _Out_ PVOID _Out_ PMDL _Out_ PIO_STATUS_BLOCK _Out_ struct _COMPRESSED_DATA_INFO _In_ ULONG CompressedDataInfoLength
Definition: iotypes.h:1615
_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)
_Inout_opt_ POEM_STRING OemName
Definition: rtlfuncs.h:2977
FORCEINLINE PSINGLE_LIST_ENTRY PopEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead)
Definition: rtlfuncs.h:240
FORCEINLINE VOID InitializeSListHead(_Out_ PSLIST_HEADER SListHead)
Definition: rtlfuncs.h:3353
_In_ ULONG _Inout_updates_bytes_(CompressedDataInfoLength) PCOMPRESSED_DATA_INFO CompressedDataInfo
_In_opt_ ULONG _In_ _Post_invalid_ PVOID BaseAddress
Definition: rtlfuncs.h:1344
_In_ PCWSTR _In_z_ PCWSTR _In_ ULONG _In_reads_bytes_opt_(ValueLength) PVOID ValueData
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
_Must_inspect_result_ NTSYSAPI PVOID NTAPI RtlLookupElementGenericTable(_In_ PRTL_GENERIC_TABLE Table, _In_ PVOID Buffer)
NTSYSAPI WCHAR NTAPI RtlDowncaseUnicodeChar(IN WCHAR Source)
Definition: nls.c:131
_In_ ULONG _In_ ULONG StartingAceIndex
Definition: rtlfuncs.h:1853
*UnicodeStringActualByteCount PWSTR _In_ ULONG _Out_ PULONG _In_ ULONG UTF8StringByteCount
Definition: rtlfuncs.h:2665
#define Code
Definition: deflate.h:80
_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
Definition: rtlfuncs.h:1559
NTSYSAPI NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW *, DWORD, DWORDLONG)
int64_t LONGLONG
Definition: typedefs.h:66
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define UNALIGNED
Definition: crtdefs.h:132
#define _Out_opt_
Definition: no_sal2.h:339
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
int64_t LONG64
Definition: typedefs.h:66
NTSYSAPI NTSTATUS NTAPI RtlIntegerToUnicodeString(ULONG Value, ULONG Base, PUNICODE_STRING String)
root entry for file system trees
Definition: entries.h:148
_In_ ULONG _In_ ULONG AceFlags
Definition: rtlfuncs.h:1115
CONST CHAR * PCCH
Definition: ntbasedef.h:399
_In_ SIZE_T _In_ SIZE_T String2Length
Definition: rtlfuncs.h:515
NTSYSAPI ULONG NTAPI RtlFindLastBackwardRunClear(_In_ PRTL_BITMAP BitMapHeader, _In_ ULONG FromIndex, _Out_ PULONG StartingRunIndex)
*BytesInOemString PCHAR _In_ ULONG MaxBytesInOemString
Definition: rtlfuncs.h:1561
NTSYSAPI VOID NTAPI RtlEndEnumerationHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _Inout_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
LPTSTR ServiceName
Definition: ServiceMain.c:15
NTSYSAPI NTSTATUS NTAPI RtlCmEncodeMemIoResource(_In_ PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor, _In_ UCHAR Type, _In_ ULONGLONG Length, _In_ ULONGLONG Start)
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 NTSTATUS NTAPI RtlAppendUnicodeToString(PUNICODE_STRING Destination, PCWSTR Source)
FORCEINLINE VOID NTAPI RtlInitHashTableContextFromEnumerator(_Inout_ PRTL_DYNAMIC_HASH_TABLE_CONTEXT Context, _In_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
Definition: rtlfuncs.h:3587
NTSYSAPI PRTL_SPLAY_LINKS NTAPI RtlDelete(_In_ PRTL_SPLAY_LINKS Links)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
if(!(yy_init))
Definition: macro.lex.yy.c:714
FORCEINLINE VOID InsertTailList(_Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY Entry)
Definition: rtlfuncs.h:180
NTSTATUS NTAPI RtlCreateSystemVolumeInformationFolder(IN PUNICODE_STRING VolumeRootPath)
Definition: sysvol.c:545
__wchar_t WCHAR
Definition: xmlstorage.h:180
NTSYSAPI ULONG NTAPI RtlFindLongestRunClear(_In_ PRTL_BITMAP BitMapHeader, _Out_ PULONG StartingIndex)
NTSYSAPI PSID_IDENTIFIER_AUTHORITY NTAPI RtlIdentifierAuthoritySid(PSID Sid)
_Must_inspect_result_ NTSYSAPI PVOID NTAPI RtlEnumerateGenericTableAvl(_In_ PRTL_AVL_TABLE Table, _In_ BOOLEAN Restart)
DWORD LowPart
char CCHAR
Definition: typedefs.h:50
#define _Pre_
Definition: no_sal2.h:476
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PCUNICODE_STRING Source)
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor
Definition: rtlfuncs.h:1551
FORCEINLINE LUID NTAPI_INLINE RtlConvertUlongToLuid(_In_ ULONG Val)
Definition: rtlfuncs.h:3543
uint64_t ULONGLONG
Definition: typedefs.h:65
_In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber)
#define _Ret_maybenull_
Definition: no_sal2.h:590
FORCEINLINE ULONG NTAPI RtlEmptyBucketsHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
Definition: rtlfuncs.h:3626
#define NTAPI_INLINE
Definition: umtypes.h:68
_Must_inspect_result_ NTSYSAPI PVOID NTAPI RtlGetElementGenericTable(_In_ PRTL_GENERIC_TABLE Table, _In_ ULONG I)
NTSYSAPI DWORD WINAPI RtlRunOnceComplete(PRTL_RUN_ONCE, DWORD, PVOID)
NTSYSAPI VOID NTAPI RtlEndWeakEnumerationHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _Inout_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
NTSYSAPI ULONG NTAPI RtlNumberGenericTableElementsAvl(_In_ PRTL_AVL_TABLE Table)
#define FAST_FAIL_CORRUPT_LIST_ENTRY
_In_ GUID _In_ PVOID ValueData
Definition: hubbusif.h:311
RTL_RUN_ONCE_INIT_FN * PRTL_RUN_ONCE_INIT_FN
Definition: winnt_old.h:2537
NTSYSAPI VOID NTAPI RtlFreeAnsiString(PANSI_STRING AnsiString)
*UTF8StringActualByteCount PCHAR _In_ ULONG _Out_ PULONG _In_ ULONG UnicodeStringByteCount
Definition: rtlfuncs.h:2652
VOID NTAPI RtlClearBit(_In_ PRTL_BITMAP BitMapHeader, _In_ BITMAP_INDEX BitNumber)
Definition: bitmap.c:294
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
_In_ PSTRING FullName
Definition: rtlfuncs.h:1649
_Notnull_ __drv_aliasesMem PWSTR _In_ USHORT BufferSize
Definition: rtlfuncs.h:2980
*BytesInUnicodeString PWCH _In_ ULONG _Out_opt_ PULONG BytesInUnicodeString
Definition: rtlfuncs.h:1980
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2891
*UnicodeStringActualByteCount PWSTR _In_ ULONG _Out_ PULONG UnicodeStringActualByteCount
Definition: rtlfuncs.h:2661
PUNICODE_PREFIX_TABLE_ENTRY NTAPI RtlFindUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable, PUNICODE_STRING FullName, ULONG CaseInsensitiveIndex)
#define PSLIST_ENTRY
Definition: rtltypes.h:130
_Must_inspect_result_ NTSYSAPI BOOLEAN NTAPI RtlTestBit(_In_ PRTL_BITMAP BitMapHeader, _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber)
Definition: bitmap.c:434
#define _Inout_
Definition: no_sal2.h:244
*UTF8StringActualByteCount PCHAR UTF8StringDestination
Definition: rtlfuncs.h:2648
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
#define RTL_HASH_ALLOCATED_HEADER
Definition: rtltypes.h:503
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_opt_ PVOID _In_opt_ SIZE_T _In_opt_ SIZE_T _In_opt_ PVOID _In_opt_ PRTL_HEAP_PARAMETERS Parameters
Definition: rtlfuncs.h:2169
RTL_AVL_MATCH_FUNCTION * PRTL_AVL_MATCH_FUNCTION
Definition: rtltypes.h:407
_Must_inspect_result_ typedef _In_ ULONG _In_ BOOLEAN Target
Definition: iotypes.h:1068
Definition: partlist.h:33
CONST STRING * PCOEM_STRING
Definition: umtypes.h:205
NTSYSAPI NTSTATUS NTAPI RtlConvertSidToUnicodeString(OUT PUNICODE_STRING DestinationString, IN PVOID Sid, IN BOOLEAN AllocateDestinationString)
NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeToOemN(PCHAR OemString, ULONG OemSize, PULONG ResultSize, PCWCH UnicodeString, ULONG UnicodeSize)
NTSYSAPI NTSTATUS NTAPI RtlAddAce(_Inout_ PACL Acl, _In_ ULONG AceRevision, _In_ ULONG StartingAceIndex, _In_reads_bytes_(AceListLength) PVOID AceList, _In_ ULONG AceListLength)
CHAR Message[80]
Definition: alive.c:5
std::wstring STRING
Definition: fontsub.cpp:33
_In_ PCWSTR _In_z_ PCWSTR _In_ ULONG _In_ ULONG ValueLength
Definition: rtlfuncs.h:4021
WCHAR * PWCH
Definition: ntbasedef.h:417
_IRQL_requires_same_ _In_ PVOID _Inout_ struct _CONTEXT * ContextRecord
Definition: ntbasedef.h:661
_Out_writes_bytes_to_opt_ BufferLength PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor
Definition: rtlfuncs.h:1094
unsigned __int64 ULONG64
Definition: imports.h:198
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
Definition: rtlfuncs.h:1553
FORCEINLINE BOOLEAN RemoveEntryListUnsafe(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:65
unsigned char UCHAR
Definition: xmlstorage.h:181
#define _Reserved_
Definition: no_sal2.h:573
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:636
char * PBOOLEAN
Definition: retypes.h:11
NTSYSAPI NTSTATUS NTAPI RtlUnicodeToMultiByteN(PCHAR MbString, ULONG MbSize, PULONG ResultSize, PCWCH UnicodeString, ULONG UnicodeSize)
#define _Pre_maybenull_
Definition: no_sal2.h:495
NTSYSAPI NTSTATUS WINAPI RtlWriteRegistryValue(ULONG, PCWSTR, PCWSTR, ULONG, PVOID, ULONG)
NTSYSAPI NTSTATUS NTAPI RtlCreateVirtualAccountSid(_In_ PCUNICODE_STRING Name, _In_ ULONG BaseSubAuthority, _Out_writes_bytes_(*SidLength) PSID Sid, _Inout_ PULONG SidLength)
_In_ BOOLEAN Restart
Definition: rtlfuncs.h:1692
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1869
NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int, const UNICODE_STRING *, UNICODE_STRING *)
LONG HighPart
NTSYSAPI NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR, PSID, BOOLEAN)
NTSYSAPI BOOLEAN WINAPI RtlPrefixString(const STRING *, const STRING *, BOOLEAN)
Definition: unicode.c:875
NTSYSAPI NTSTATUS NTAPI RtlIdnToUnicode(IN ULONG Flags, IN PCWSTR SourceString, IN LONG SourceStringLength, OUT PWSTR DestinationString, IN OUT PLONG DestinationStringLength)
#define _Writable_bytes_(size)
Definition: no_sal2.h:640
NTSYSAPI NTSTATUS WINAPI RtlUpcaseUnicodeStringToAnsiString(STRING *, const UNICODE_STRING *, BOOLEAN)
NTSYSAPI ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP, ULONG, ULONG)
NTSYSAPI LONGLONG WINAPI RtlConvertLongToLargeInteger(LONG)
Definition: largeint.c:31
_In_ ULONG _In_ ULONG AclRevision
Definition: rtlfuncs.h:1844
NTSTATUS NTAPI RtlDecompressFragment(IN USHORT format, OUT PUCHAR uncompressed, IN ULONG uncompressed_size, IN PUCHAR compressed, IN ULONG compressed_size, IN ULONG offset, OUT PULONG final_size, IN PVOID workspace)
Definition: compress.c:342
#define InterlockedPushEntrySList(SListHead, SListEntry)
Definition: rtlfuncs.h:3391
_In_ PCWSTR _In_z_ PCWSTR ValueName
Definition: rtlfuncs.h:4016
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToOemString(POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define I(s)
NTSYSAPI NTSTATUS NTAPI RtlIdnToNameprepUnicode(_In_ ULONG Flags, _In_ PCWSTR SourceString, _In_ LONG SourceStringLength, _Out_writes_to_(*DestinationStringLength, *DestinationStringLength) PWSTR DestinationString, _Inout_ PLONG DestinationStringLength)
VOID NTAPI RtlInitializeGenericTableAvl(IN OUT PRTL_AVL_TABLE Table, IN PRTL_AVL_COMPARE_ROUTINE CompareRoutine, IN PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine, IN PRTL_AVL_FREE_ROUTINE FreeRoutine, IN PVOID TableContext)
Definition: avltable.c:26
NTSYSAPI PVOID NTAPI RtlCreateHeap(IN ULONG Flags, IN PVOID HeapBase OPTIONAL, IN ULONG ReserveSize OPTIONAL, IN ULONG CommitSize OPTIONAL, IN PVOID Lock OPTIONAL, IN PRTL_HEAP_PARAMETERS Parameters OPTIONAL)
VOID NTAPI RtlInitCodePageTable(IN PUSHORT TableBase, OUT PCPTABLEINFO CodePageTable)
Definition: nls.c:155
FORCEINLINE VOID AppendTailList(_Inout_ PLIST_ENTRY ListHead, _Inout_ PLIST_ENTRY ListToAppend)
Definition: rtlfuncs.h:222
BOOLEAN NTAPI RtlInsertUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable, PUNICODE_STRING Prefix, PUNICODE_PREFIX_TABLE_ENTRY PrefixTableEntry)
Definition: typedefs.h:117
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)
FORCEINLINE ULONG NTAPI RtlTotalBucketsHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable)
Definition: rtlfuncs.h:3608
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
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)
_In_ BOOLEAN _Inout_ PGENERATE_NAME_CONTEXT _Inout_ PUNICODE_STRING Name8dot3
Definition: rtlfuncs.h:1585
_In_ PSID_IDENTIFIER_AUTHORITY _In_ UCHAR SubAuthorityCount
Definition: rtlfuncs.h:1487
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_In_ ULONG StartingIndex
Definition: rtlfuncs.h:395
_In_ ULONG UncompressedFragmentSize
Definition: rtlfuncs.h:2263
_In_ ULONG AceIndex
Definition: rtlfuncs.h:1864
RTL_AVL_FREE_ROUTINE * PRTL_AVL_FREE_ROUTINE
Definition: rtltypes.h:398
NTSYSAPI ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP, ULONG, ULONG)
Definition: rtltypes.h:603
_In_ ULONG _In_ ULONG _In_ ULONG AceListLength
Definition: rtlfuncs.h:1856
NTSYSAPI NTSTATUS NTAPI RtlOemStringToUnicodeString(PUNICODE_STRING DestinationString, PCOEM_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI ULONG NTAPI RtlxAnsiStringToUnicodeSize(PCANSI_STRING AnsiString)
NTSYSAPI BOOLEAN NTAPI RtlInitEnumerationHashTable(_In_ PRTL_DYNAMIC_HASH_TABLE HashTable, _Out_ PRTL_DYNAMIC_HASH_TABLE_ENUMERATOR Enumerator)
_In_opt_ PVOID HeapBase
Definition: rtlfuncs.h:2169
NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeToMultiByteN(PCHAR MbString, ULONG MbSize, PULONG ResultSize, PCWCH UnicodeString, ULONG UnicodeSize)
NTSYSAPI NTSTATUS NTAPI RtlIsNormalizedString(_In_ ULONG NormForm, _In_ PCWSTR SourceString, _In_ LONG SourceStringLength, _Out_ PBOOLEAN Normalized)
#define _Maybe_raises_SEH_exception_
Definition: no_sal2.h:313
*BytesInUnicodeString PWCH _In_ ULONG _Out_opt_ PULONG _In_ ULONG BytesInOemString
Definition: rtlfuncs.h:1985
_In_ ULONG _In_ ACCESS_MASK AccessMask
Definition: rtlfuncs.h:1104
_In_ SIZE_T _In_reads_(String2Length) PCWCH String2
NTSYSAPI VOID NTAPI RtlInitString(PSTRING DestinationString, PCSZ SourceString)
Status
Definition: gdiplustypes.h:24
NTSYSAPI ULONG NTAPI RtlRandomEx(PULONG Seed)
NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD *, LPCSTR, UINT)
_Post_satisfies_(return >=8 &&return<=SECURITY_MAX_SID_SIZE) NTSYSAPI ULONG NTAPI RtlLengthSid(_In_ PSID Sid)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define _In_
Definition: no_sal2.h:204
UnicodeString MaximumLength
Definition: rtlfuncs.h:2982
#define _Valid_
Definition: no_sal2.h:638
ULONG_PTR SIZE_T
Definition: typedefs.h:78
NTSYSAPI BOOLEAN NTAPI RtlEqualPrefixSid(PSID Sid1, PSID Sid2)
NTSYSAPI BOOLEAN NTAPI RtlDeleteElementGenericTable(_In_ PRTL_GENERIC_TABLE Table, _In_ PVOID Buffer)
NTSTATUS NTAPI RtlUnicodeToCustomCPN(IN PCPTABLEINFO CustomCP, OUT PCHAR CustomString, IN ULONG CustomSize, OUT PULONG ResultSize OPTIONAL, IN PWCHAR UnicodeString, IN ULONG UnicodeSize)
Definition: nls.c:480
NTSYSAPI BOOLEAN NTAPI RtlIsGenericTableEmpty(_In_ PRTL_GENERIC_TABLE Table)
_Must_inspect_result_ NTSYSAPI SIZE_T NTAPI RtlCompareMemory(_In_ const VOID *Source1, _In_ const VOID *Source2, _In_ SIZE_T Length)
NTSYSAPI NTSTATUS NTAPI RtlGetSaclSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN SaclPresent, _Out_ PACL *Sacl, _Out_ PBOOLEAN SaclDefaulted)
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
Definition: acpixf.h:1212
_Out_range_(>, 0)) _When_(Status >=0
NTSYSAPI PVOID NTAPI RtlDestroyHeap(_In_ _Post_invalid_ PVOID HeapHandle)
unsigned short USHORT
Definition: pedump.c:61
NTSYSAPI ULONG NTAPI RtlxUnicodeStringToOemSize(IN PCUNICODE_STRING UnicodeString)
Definition: unicode.c:1080
#define _Pre_readable_size_(size)
Definition: no_sal2.h:532
#define _In_z_
Definition: no_sal2.h:239
*UTF8StringActualByteCount PCHAR _In_ ULONG UTF8StringMaxByteCount
Definition: rtlfuncs.h:2648
_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 RtlIsGenericTableEmptyAvl(_In_ PRTL_AVL_TABLE Table)
VOID NTAPI PfxInitialize(IN PPREFIX_TABLE PrefixTable)
Definition: prefix.c:17
NTSTATUS NTAPI RtlReserveChunk(IN USHORT CompressionFormat, IN OUT PUCHAR *CompressedBuffer, IN PUCHAR EndOfCompressedBufferPlus1, OUT PUCHAR *ChunkBuffer, IN ULONG ChunkSize)
Definition: compress.c:429
NTSYSAPI VOID NTAPI RtlGenerate8dot3Name(_In_ PCUNICODE_STRING Name, _In_ BOOLEAN AllowExtendedCharacters, _Inout_ PGENERATE_