ReactOS  r73918
rtlfuncs.h
Go to the documentation of this file.
1 /*++ NDK Version: 0098
2 
3 Copyright (c) Alex Ionescu. All rights reserved.
4 
5 Header Name:
6 
7  rtlfuncs.h
8 
9 Abstract:
10 
11  Function definitions for the Run-Time Library
12 
13 Author:
14 
15  Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16 
17 --*/
18 
19 #ifndef _RTLFUNCS_H
20 #define _RTLFUNCS_H
21 
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26 #include <ntnls.h>
27 #include <rtltypes.h>
28 #include <pstypes.h>
29 #include <extypes.h>
30 #include "in6addr.h"
31 #include "inaddr.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 #ifdef NTOS_MODE_USER
38 
39 //
40 // List Functions
41 //
43 VOID
45  _Out_ PLIST_ENTRY ListHead
46 )
47 {
48  ListHead->Flink = ListHead->Blink = ListHead;
49 }
50 
52 VOID
54  _Inout_ PLIST_ENTRY ListHead,
56 )
57 {
58  PLIST_ENTRY OldFlink;
59  OldFlink = ListHead->Flink;
60  Entry->Flink = OldFlink;
61  Entry->Blink = ListHead;
62  OldFlink->Blink = Entry;
63  ListHead->Flink = Entry;
64 }
65 
67 VOID
69  _Inout_ PLIST_ENTRY ListHead,
71 )
72 {
73  PLIST_ENTRY OldBlink;
74  OldBlink = ListHead->Blink;
75  Entry->Flink = ListHead;
76  Entry->Blink = OldBlink;
77  OldBlink->Flink = Entry;
78  ListHead->Blink = Entry;
79 }
80 
83 BOOLEAN
85  _In_ const LIST_ENTRY * ListHead
86 )
87 {
88  return (BOOLEAN)(ListHead->Flink == ListHead);
89 }
90 
95 )
96 {
97  PSINGLE_LIST_ENTRY FirstEntry;
98  FirstEntry = ListHead->Next;
99  if (FirstEntry != NULL) {
100  ListHead->Next = FirstEntry->Next;
101  }
102 
103  return FirstEntry;
104 }
105 
107 VOID
109  _Inout_ PSINGLE_LIST_ENTRY ListHead,
111 )
112 {
113  Entry->Next = ListHead->Next;
114  ListHead->Next = Entry;
115 }
116 
118 BOOLEAN
121 {
122  PLIST_ENTRY OldFlink;
123  PLIST_ENTRY OldBlink;
124 
125  OldFlink = Entry->Flink;
126  OldBlink = Entry->Blink;
127  OldFlink->Blink = OldBlink;
128  OldBlink->Flink = OldFlink;
129  return (BOOLEAN)(OldFlink == OldBlink);
130 }
131 
135  _Inout_ PLIST_ENTRY ListHead)
136 {
137  PLIST_ENTRY Flink;
139 
140  Entry = ListHead->Flink;
141  Flink = Entry->Flink;
142  ListHead->Flink = Flink;
143  Flink->Blink = ListHead;
144  return Entry;
145 }
146 
150  _Inout_ PLIST_ENTRY ListHead)
151 {
152  PLIST_ENTRY Blink;
154 
155  Entry = ListHead->Blink;
156  Blink = Entry->Blink;
157  ListHead->Blink = Blink;
158  Blink->Flink = ListHead;
159  return Entry;
160 }
161 
162 //
163 // Unicode string macros
164 //
169 VOID
170 RtlInitEmptyUnicodeString(
173  _In_ USHORT BufferSize)
174 {
175  UnicodeString->Length = 0;
176  UnicodeString->MaximumLength = BufferSize;
177  UnicodeString->Buffer = Buffer;
178 }
179 
184 VOID
185 RtlInitEmptyAnsiString(
188  _In_ USHORT BufferSize)
189 {
190  AnsiString->Length = 0;
191  AnsiString->MaximumLength = BufferSize;
192  AnsiString->Buffer = Buffer;
193 }
194 
195 //
196 // LUID Macros
197 //
198 #define RtlEqualLuid(L1, L2) (((L1)->HighPart == (L2)->HighPart) && \
199  ((L1)->LowPart == (L2)->LowPart))
201 LUID
204  _In_ ULONG Ulong)
205 {
206  LUID TempLuid;
207 
208  TempLuid.LowPart = Ulong;
209  TempLuid.HighPart = 0;
210  return TempLuid;
211 }
212 
213 //
214 // ASSERT Macros
215 //
216 #ifndef ASSERT
217 #if DBG
218 
219 #define ASSERT( exp ) \
220  ((void)((!(exp)) ? \
221  (RtlAssert( (PVOID)#exp, (PVOID)__FILE__, __LINE__, NULL ),FALSE) : \
222  TRUE))
223 
224 #define ASSERTMSG( msg, exp ) \
225  ((void)((!(exp)) ? \
226  (RtlAssert( (PVOID)#exp, (PVOID)__FILE__, __LINE__, (PCHAR)msg ),FALSE) : \
227  TRUE))
228 
229 #else
230 
231 #define ASSERT( exp ) ((void) 0)
232 #define ASSERTMSG( msg, exp ) ((void) 0)
233 
234 #endif
235 #endif
236 
237 #ifdef NTOS_KERNEL_RUNTIME
238 
239 //
240 // Executing RTL functions at DISPATCH_LEVEL or higher will result in a
241 // bugcheck.
242 //
243 #define RTL_PAGED_CODE PAGED_CODE
244 
245 #else
246 
247 //
248 // This macro does nothing in user mode
249 //
250 #define RTL_PAGED_CODE NOP_FUNCTION
251 
252 #endif
253 
254 //
255 // RTL Splay Tree Functions
256 //
257 #ifndef RTL_USE_AVL_TABLES
258 
259 NTSYSAPI
260 VOID
261 NTAPI
268 );
269 
270 NTSYSAPI
271 PVOID
272 NTAPI
277  _Out_opt_ PBOOLEAN NewElement
278 );
279 
280 NTSYSAPI
281 PVOID
282 NTAPI
284  _In_ PRTL_GENERIC_TABLE Table,
287  _Out_opt_ PBOOLEAN NewElement,
288  _In_ PVOID NodeOrParent,
289  _In_ TABLE_SEARCH_RESULT SearchResult
290 );
291 
292 NTSYSAPI
293 BOOLEAN
294 NTAPI
296  _In_ PRTL_GENERIC_TABLE Table,
298 );
299 
301 NTSYSAPI
302 PVOID
303 NTAPI
305  _In_ PRTL_GENERIC_TABLE Table,
307 );
308 
309 NTSYSAPI
310 PVOID
311 NTAPI
313  _In_ PRTL_GENERIC_TABLE Table,
314  _In_ PVOID Buffer,
315  _Out_ PVOID *NodeOrParent,
316  _Out_ TABLE_SEARCH_RESULT *SearchResult
317 );
318 
320 NTSYSAPI
321 PVOID
322 NTAPI
324  _In_ PRTL_GENERIC_TABLE Table,
326 );
327 
329 NTSYSAPI
330 PVOID
331 NTAPI
333  _In_ PRTL_GENERIC_TABLE Table,
334  _Inout_ PVOID *RestartKey
335 );
336 
338 NTSYSAPI
339 PVOID
340 NTAPI
342  _In_ PRTL_GENERIC_TABLE Table,
343  _In_ ULONG I
344 );
345 
346 NTSYSAPI
347 ULONG
348 NTAPI
351 );
352 
354 NTSYSAPI
355 BOOLEAN
356 NTAPI
359 );
360 
361 #endif /* !RTL_USE_AVL_TABLES */
362 
363 NTSYSAPI
365 NTAPI
366 RtlSplay(
368 );
369 
370 NTSYSAPI
372 NTAPI
373 RtlDelete(
374  _In_ PRTL_SPLAY_LINKS Links
375 );
376 
377 NTSYSAPI
378 VOID
379 NTAPI
381  _In_ PRTL_SPLAY_LINKS Links,
383 );
384 
386 NTSYSAPI
388 NTAPI
390  _In_ PRTL_SPLAY_LINKS Links
391 );
392 
394 NTSYSAPI
396 NTAPI
398  _In_ PRTL_SPLAY_LINKS Links
399 );
400 
402 NTSYSAPI
404 NTAPI
406  _In_ PRTL_SPLAY_LINKS Links
407 );
408 
410 NTSYSAPI
412 NTAPI
414  _In_ PRTL_SPLAY_LINKS Links
415 );
416 
417 #define RtlIsLeftChild(Links) \
418  (RtlLeftChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
419 
420 #define RtlIsRightChild(Links) \
421  (RtlRightChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
422 
423 #define RtlRightChild(Links) \
424  ((PRTL_SPLAY_LINKS)(Links))->RightChild
425 
426 #define RtlIsRoot(Links) \
427  (RtlParent(Links) == (PRTL_SPLAY_LINKS)(Links))
428 
429 #define RtlLeftChild(Links) \
430  ((PRTL_SPLAY_LINKS)(Links))->LeftChild
431 
432 #define RtlParent(Links) \
433  ((PRTL_SPLAY_LINKS)(Links))->Parent
434 
435 // FIXME: use inline function
436 
437 #define RtlInitializeSplayLinks(Links) \
438  { \
439  PRTL_SPLAY_LINKS _SplayLinks; \
440  _SplayLinks = (PRTL_SPLAY_LINKS)(Links); \
441  _SplayLinks->Parent = _SplayLinks; \
442  _SplayLinks->LeftChild = NULL; \
443  _SplayLinks->RightChild = NULL; \
444  }
445 
446 #define RtlInsertAsLeftChild(ParentLinks,ChildLinks) \
447  { \
448  PRTL_SPLAY_LINKS _SplayParent; \
449  PRTL_SPLAY_LINKS _SplayChild; \
450  _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
451  _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
452  _SplayParent->LeftChild = _SplayChild; \
453  _SplayChild->Parent = _SplayParent; \
454  }
455 
456 #define RtlInsertAsRightChild(ParentLinks,ChildLinks) \
457  { \
458  PRTL_SPLAY_LINKS _SplayParent; \
459  PRTL_SPLAY_LINKS _SplayChild; \
460  _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
461  _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
462  _SplayParent->RightChild = _SplayChild; \
463  _SplayChild->Parent = _SplayParent; \
464  }
465 
466 //
467 // RTL AVL Tree Functions
468 //
469 NTSYSAPI
470 VOID
471 NTAPI
473  _Out_ PRTL_AVL_TABLE Table,
478 );
479 
480 NTSYSAPI
481 PVOID
482 NTAPI
484  _In_ PRTL_AVL_TABLE Table,
487  _Out_opt_ PBOOLEAN NewElement
488 );
489 
490 NTSYSAPI
491 PVOID
492 NTAPI
494  _In_ PRTL_AVL_TABLE Table,
497  _Out_opt_ PBOOLEAN NewElement,
498  _In_ PVOID NodeOrParent,
499  _In_ TABLE_SEARCH_RESULT SearchResult
500 );
501 
502 NTSYSAPI
503 BOOLEAN
504 NTAPI
506  _In_ PRTL_AVL_TABLE Table,
508 );
509 
511 NTSYSAPI
512 PVOID
513 NTAPI
515  _In_ PRTL_AVL_TABLE Table,
517 );
518 
519 NTSYSAPI
520 PVOID
521 NTAPI
523  _In_ PRTL_AVL_TABLE Table,
524  _In_ PVOID Buffer,
525  _Out_ PVOID *NodeOrParent,
526  _Out_ TABLE_SEARCH_RESULT *SearchResult
527 );
528 
530 NTSYSAPI
531 PVOID
532 NTAPI
534  _In_ PRTL_AVL_TABLE Table,
536 );
537 
539 NTSYSAPI
540 PVOID
541 NTAPI
543  _In_ PRTL_AVL_TABLE Table,
544  _Inout_ PVOID *RestartKey
545 );
546 
548 NTSYSAPI
549 PVOID
550 NTAPI
552  _In_ PRTL_AVL_TABLE Table,
553  _In_ PVOID Buffer,
554  _Out_ PVOID *RestartKey
555 );
556 
558 NTSYSAPI
559 PVOID
560 NTAPI
562  _In_ PRTL_AVL_TABLE Table,
563  _In_opt_ PRTL_AVL_MATCH_FUNCTION MatchFunction,
565  _In_ ULONG NextFlag,
566  _Inout_ PVOID *RestartKey,
567  _Inout_ PULONG DeleteCount,
569 );
570 
572 NTSYSAPI
573 PVOID
574 NTAPI
576  _In_ PRTL_AVL_TABLE Table,
577  _In_ ULONG I
578 );
579 
580 NTSYSAPI
581 ULONG
582 NTAPI
584  _In_ PRTL_AVL_TABLE Table
585 );
586 
588 NTSYSAPI
589 BOOLEAN
590 NTAPI
592  _In_ PRTL_AVL_TABLE Table
593 );
594 
595 #ifdef RTL_USE_AVL_TABLES
596 
597 #define RtlInitializeGenericTable RtlInitializeGenericTableAvl
598 #define RtlInsertElementGenericTable RtlInsertElementGenericTableAvl
599 #define RtlInsertElementGenericTableFull RtlInsertElementGenericTableFullAvl
600 #define RtlDeleteElementGenericTable RtlDeleteElementGenericTableAvl
601 #define RtlLookupElementGenericTable RtlLookupElementGenericTableAvl
602 #define RtlLookupElementGenericTableFull RtlLookupElementGenericTableFullAvl
603 #define RtlEnumerateGenericTable RtlEnumerateGenericTableAvl
604 #define RtlEnumerateGenericTableWithoutSplaying RtlEnumerateGenericTableWithoutSplayingAvl
605 #define RtlGetElementGenericTable RtlGetElementGenericTableAvl
606 #define RtlNumberGenericTableElements RtlNumberGenericTableElementsAvl
607 #define RtlIsGenericTableEmpty RtlIsGenericTableEmptyAvl
608 
609 #endif /* RTL_USE_AVL_TABLES */
610 
611 //
612 // Exception and Error Functions
613 //
614 NTSYSAPI
615 PVOID
616 NTAPI
618  _In_ ULONG FirstHandler,
619  _In_ PVECTORED_EXCEPTION_HANDLER VectoredHandler
620 );
621 
623 NTSYSAPI
624 VOID
625 NTAPI
626 RtlAssert(
627  _In_ PVOID FailedAssertion,
631 );
632 
633 NTSYSAPI
634 VOID
635 NTAPI
637  _In_ PRTLP_UNHANDLED_EXCEPTION_FILTER TopLevelExceptionFilter
638 );
639 
640 NTSYSAPI
641 LONG
642 NTAPI
644  _In_ struct _EXCEPTION_POINTERS* ExceptionInfo
645 );
646 
647 NTSYSAPI
648 PVOID
649 NTAPI
651  _In_ PVOID Pointer
652 );
653 
654 NTSYSAPI
655 PVOID
656 NTAPI
658  _In_ PVOID Pointer
659 );
660 
661 NTSYSAPI
662 PVOID
663 NTAPI
665  _In_ PVOID Pointer
666 );
667 
668 NTSYSAPI
669 PVOID
670 NTAPI
671 RtlDecodeSystemPointer(
672  _In_ PVOID Pointer
673 );
674 
675 NTSYSAPI
676 NTSTATUS
677 NTAPI
679  VOID
680 );
681 
682 NTSYSAPI
683 ULONG
684 NTAPI
686  VOID
687 );
688 
689 NTSYSAPI
690 VOID
691 NTAPI
693  _In_ ULONG LastError
694 );
695 
696 NTSYSAPI
697 VOID
698 NTAPI
701 );
702 
703 NTSYSAPI
704 NTSTATUS
705 NTAPI
707  _In_ ULONG NewMode,
708  _Out_opt_ PULONG OldMode
709 );
710 
711 NTSYSAPI
712 ULONG
713 NTAPI
715  VOID
716 );
717 
718 #endif /* NTOS_MODE_USER */
719 
720 NTSYSAPI
721 VOID
722 NTAPI
725 );
726 
727 NTSYSAPI
728 BOOLEAN
729 NTAPI
731  _In_ PEXCEPTION_RECORD ExceptionRecord,
733 );
734 
736 _When_(Status < 0, _Out_range_(>, 0))
737 _When_(Status >= 0, _Out_range_(==, 0))
738 NTSYSAPI
739 ULONG
740 NTAPI
742  _In_ NTSTATUS Status
743 );
744 
745 _When_(Status < 0, _Out_range_(>, 0))
746 _When_(Status >= 0, _Out_range_(==, 0))
747 NTSYSAPI
748 ULONG
749 NTAPI
751  _In_ NTSTATUS Status
752 );
753 
754 NTSYSAPI
755 NTSTATUS
756 NTAPI
758  _In_ ULONG SecurityError
759 );
760 
761 NTSYSAPI
762 VOID
763 NTAPI
765  _In_ PEXCEPTION_RECORD ExceptionRecord
766 );
767 
769 NTSYSAPI
770 VOID
771 NTAPI
773  _In_ NTSTATUS Status
774 );
775 
776 NTSYSAPI
777 VOID
778 NTAPI
779 RtlUnwind(
780  _In_opt_ PVOID TargetFrame,
781  _In_opt_ PVOID TargetIp,
782  _In_opt_ PEXCEPTION_RECORD ExceptionRecord,
784 );
785 
786 #define RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT 8
787 
788 //
789 // Tracing Functions
790 //
791 NTSYSAPI
792 ULONG
793 NTAPI
796  _In_ ULONG Count,
798 );
799 
800 NTSYSAPI
801 USHORT
802 NTAPI
804  VOID
805 );
806 
807 #ifdef NTOS_MODE_USER
808 //
809 // Heap Functions
810 //
814 NTSYSAPI
815 PVOID
816 NTAPI
818  _In_ PVOID HeapHandle,
821 );
822 
824 NTSYSAPI
825 PVOID
826 NTAPI
828  _In_ ULONG Flags,
830  _In_opt_ SIZE_T SizeToReserve,
831  _In_opt_ SIZE_T SizeToCommit,
834 );
835 
836 NTSYSAPI
837 ULONG
838 NTAPI
840  _In_ HANDLE HeapHandle,
841  _In_ ULONG Flags,
842  _In_ PWSTR TagName,
843  _In_ PWSTR TagSubName
844 );
845 
846 ULONG
847 NTAPI
849  _In_ HANDLE Heap,
850  _In_ ULONG Flags
851 );
852 
854 NTSYSAPI
855 PVOID
856 NTAPI
858  _In_ ULONG Flags,
859  _In_opt_ PVOID BaseAddress,
860  _In_opt_ SIZE_T SizeToReserve,
861  _In_opt_ SIZE_T SizeToCommit,
862  _In_opt_ PVOID Lock,
863  _In_opt_ PRTL_HEAP_PARAMETERS Parameters
864 );
865 
866 NTSYSAPI
867 HANDLE
868 NTAPI
871 );
872 
873 NTSYSAPI
874 ULONG
875 NTAPI
877  _In_ HANDLE Heap,
878  _In_ ULONG Flags,
879  _In_ PVOID P,
880  _In_ SIZE_T Size
881 );
882 
883 _Success_(return != 0)
884 NTSYSAPI
885 BOOLEAN
886 NTAPI
888  _In_ HANDLE HeapHandle,
889  _In_opt_ ULONG Flags,
891 );
892 
893 ULONG
894 NTAPI
896  _In_ ULONG HeapCount,
897  _Out_cap_(HeapCount) HANDLE *HeapArray
898 );
899 
900 _Success_(return != 0)
901 BOOLEAN
902 NTAPI
904  _In_ PVOID HeapHandle,
905  _In_ ULONG Flags,
906  _In_ PVOID BaseAddress,
907  _Inout_opt_ PVOID *UserValue,
908  _Out_opt_ PULONG UserFlags
909 );
910 
911 NTSYSAPI
912 PVOID
913 NTAPI
915  _In_ PVOID HeapHandle,
917 );
918 
919 NTSYSAPI
920 NTSTATUS
921 NTAPI
923  _In_ PVOID HeapHandle,
924  _In_ HEAP_INFORMATION_CLASS HeapInformationClass,
925  _Out_ PVOID HeapInformation,
926  _In_ SIZE_T HeapInformationLength,
929 );
930 
932 NTSYSAPI
933 PWSTR
934 NTAPI
936  _In_ PVOID HeapHandle,
937  _In_ ULONG Flags,
938  _In_ USHORT TagIndex,
939  _In_ BOOLEAN ResetCounters,
940  _Out_ PRTL_HEAP_TAG_INFO HeapTagInfo
941 );
942 
946 NTSYSAPI
947 PVOID
948 NTAPI
950  _In_ HANDLE Heap,
951  _In_opt_ ULONG Flags,
953  _In_ SIZE_T Size
954 );
955 
956 NTSYSAPI
957 NTSTATUS
958 NTAPI
960  _In_ PVOID HeapHandle,
961  _In_ HEAP_INFORMATION_CLASS HeapInformationClass,
962  _When_(HeapInformationClass==HeapCompatibilityInformation,_In_) PVOID HeapInformation,
963  _In_ SIZE_T HeapInformationLength
964 );
965 
966 NTSYSAPI
967 BOOLEAN
968 NTAPI
970  _In_ HANDLE Heap
971 );
972 
974 NTSYSAPI
975 NTSTATUS
976 NTAPI
978  _In_ HANDLE HeapHandle,
979  _In_ ULONG Flags,
980  _In_ SIZE_T Size,
981  _In_ ULONG Count,
982  _Out_cap_(Count) _Deref_post_bytecap_(Size) PVOID * Array
983  );
984 
985 NTSYSAPI
986 NTSTATUS
987 NTAPI
989  _In_ HANDLE HeapHandle,
990  _In_ ULONG Flags,
991  _In_ ULONG Count,
992  _In_count_(Count) /* _Deref_ _Post_invalid_ */ PVOID * Array
993  );
994 
995 NTSYSAPI
996 NTSTATUS
997 NTAPI
999  _In_ HANDLE Heap,
1000  _In_ ULONG Flags,
1002 );
1003 
1004 NTSYSAPI
1005 BOOLEAN
1006 NTAPI
1008  _In_ HANDLE Heap
1009 );
1010 
1011 BOOLEAN
1012 NTAPI
1014  _In_ PVOID HeapHandle,
1015  _In_ ULONG Flags,
1016  _In_ PVOID BaseAddress,
1017  _In_ PVOID UserValue
1018 );
1019 
1020 BOOLEAN
1021 NTAPI
1023  _In_ PVOID HeapHandle,
1024  _In_ ULONG Flags,
1025  _In_ PVOID BaseAddress,
1026  _In_ ULONG UserFlagsReset,
1027  _In_ ULONG UserFlagsSet
1028 );
1029 
1030 NTSYSAPI
1031 BOOLEAN
1032 NTAPI
1034  _In_ HANDLE Heap,
1035  _In_ ULONG Flags,
1036  _In_opt_ PVOID P
1037 );
1038 
1039 NTSYSAPI
1040 NTSTATUS
1041 NTAPI
1042 RtlWalkHeap(
1043  _In_ HANDLE HeapHandle,
1044  _In_ PVOID HeapEntry
1045 );
1046 
1047 #define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
1048 
1049 #endif // NTOS_MODE_USER
1050 
1051 NTSYSAPI
1052 SIZE_T
1053 NTAPI
1054 RtlSizeHeap(
1055  _In_ PVOID HeapHandle,
1056  _In_ ULONG Flags,
1057  _In_ PVOID MemoryPointer
1058 );
1059 
1060 
1061 //
1062 // Security Functions
1063 //
1065 NTSYSAPI
1066 NTSTATUS
1067 NTAPI
1071  _Inout_ PULONG BufferLength
1072 );
1073 
1075 NTSYSAPI
1076 NTSTATUS
1077 NTAPI
1079  _Inout_ PACL Acl,
1082  _In_ PSID Sid
1083 );
1084 
1086 NTSYSAPI
1087 NTSTATUS
1088 NTAPI
1090  _Inout_ PACL pAcl,
1093  _In_ ACCESS_MASK AccessMask,
1094  _In_ PSID pSid
1095 );
1096 
1097 NTSYSAPI
1098 NTSTATUS
1099 NTAPI
1101  _Inout_ PACL pAcl,
1102  _In_ ULONG dwAceRevision,
1103  _In_ ULONG AceFlags,
1104  _In_ ACCESS_MASK AccessMask,
1105  _In_opt_ GUID *ObjectTypeGuid,
1106  _In_opt_ GUID *InheritedObjectTypeGuid,
1107  _In_ PSID pSid
1108 );
1109 
1110 NTSYSAPI
1111 NTSTATUS
1112 NTAPI
1114  _Inout_ PACL Acl,
1115  _In_ ULONG Revision,
1116  _In_ ACCESS_MASK AccessMask,
1117  _In_ PSID Sid
1118 );
1119 
1120 NTSYSAPI
1121 NTSTATUS
1122 NTAPI
1124  _Inout_ PACL Acl,
1125  _In_ ULONG Revision,
1126  _In_ ULONG Flags,
1127  _In_ ACCESS_MASK AccessMask,
1128  _In_ PSID Sid
1129 );
1130 
1131 NTSYSAPI
1132 NTSTATUS
1133 NTAPI
1135  _Inout_ PACL pAcl,
1136  _In_ ULONG dwAceRevision,
1137  _In_ ULONG AceFlags,
1138  _In_ ACCESS_MASK AccessMask,
1139  _In_opt_ GUID *ObjectTypeGuid,
1140  _In_opt_ GUID *InheritedObjectTypeGuid,
1141  _In_ PSID pSid
1142 );
1143 
1144 NTSYSAPI
1145 NTSTATUS
1146 NTAPI
1147 RtlAddAce(
1148  _Inout_ PACL Acl,
1153 );
1154 
1155 NTSYSAPI
1156 NTSTATUS
1157 NTAPI
1159  _Inout_ PACL Acl,
1160  _In_ ULONG Revision,
1161  _In_ ACCESS_MASK AccessMask,
1162  _In_ PSID Sid,
1164  _In_ BOOLEAN Failure
1165 );
1166 
1167 NTSYSAPI
1168 NTSTATUS
1169 NTAPI
1172  _In_ ULONG NumPriv,
1173  _In_ ULONG Flags,
1174  _Out_ PVOID *ReturnedState
1175 );
1176 
1177 NTSYSAPI
1178 NTSTATUS
1179 NTAPI
1181  _Inout_ PACL Acl,
1182  _In_ ULONG Revision,
1183  _In_ ULONG Flags,
1184  _In_ ACCESS_MASK AccessMask,
1185  _In_ PSID Sid,
1186  _In_ BOOLEAN Success,
1187  _In_ BOOLEAN Failure
1188 );
1189 
1190 NTSYSAPI
1191 NTSTATUS
1192 NTAPI
1194  _Inout_ PACL Acl,
1195  _In_ ULONG Revision,
1196  _In_ ULONG Flags,
1197  _In_ ACCESS_MASK AccessMask,
1198  _In_opt_ GUID *ObjectTypeGuid,
1199  _In_opt_ GUID *InheritedObjectTypeGuid,
1200  _In_ PSID Sid,
1201  _In_ BOOLEAN Success,
1202  _In_ BOOLEAN Failure
1203 );
1204 
1205 NTSYSAPI
1206 NTSTATUS
1207 NTAPI
1209  _Inout_ PACL Acl,
1210  _In_ ULONG Revision,
1211  _In_ ULONG Flags,
1212  _In_ ULONG MandatoryFlags,
1213  _In_ UCHAR AceType,
1214  _In_ PSID LabelSid);
1215 
1216 NTSYSAPI
1217 NTSTATUS
1218 NTAPI
1220  _In_ ULONG Privilege,
1221  _In_ BOOLEAN NewValue,
1222  _In_ BOOLEAN ForThread,
1223  _Out_ PBOOLEAN OldValue
1224 );
1225 
1227 NTSYSAPI
1228 NTSTATUS
1229 NTAPI
1233  _In_ ULONG SubAuthority0,
1234  _In_ ULONG SubAuthority1,
1235  _In_ ULONG SubAuthority2,
1236  _In_ ULONG SubAuthority3,
1237  _In_ ULONG SubAuthority4,
1238  _In_ ULONG SubAuthority5,
1239  _In_ ULONG SubAuthority6,
1240  _In_ ULONG SubAuthority7,
1241  _Outptr_ PSID *Sid
1242 );
1243 
1244 NTSYSAPI
1245 BOOLEAN
1246 NTAPI
1250 );
1251 
1252 NTSYSAPI
1253 BOOLEAN
1254 NTAPI
1256  ACCESS_MASK GrantedAccess,
1257  ACCESS_MASK DesiredAccess
1258 );
1259 
1261 NTSYSAPI
1262 VOID
1263 NTAPI
1264 RtlCopyLuid (
1265  _Out_ PLUID DestinationLuid,
1267  );
1268 
1269 NTSYSAPI
1270 VOID
1271 NTAPI
1273  ULONG Count,
1276 );
1277 
1278 NTSYSAPI
1279 NTSTATUS
1280 NTAPI
1282  _In_ ULONG Count,
1284  _In_ ULONG SidAreaSize,
1286  _In_ PSID SidArea,
1287  _Out_ PSID* RemainingSidArea,
1288  _Out_ PULONG RemainingSidAreaSize
1289 );
1290 
1292 NTSYSAPI
1293 NTSTATUS
1294 NTAPI
1297  _In_ PSID Sid,
1299 );
1300 
1302 NTSYSAPI
1303 NTSTATUS
1304 NTAPI
1305 RtlCopySid(
1306  _In_ ULONG DestinationSidLength,
1307  _Out_writes_bytes_(DestinationSidLength) PSID DestinationSid,
1309 );
1310 
1311 NTSYSAPI
1312 NTSTATUS
1313 NTAPI
1314 RtlCreateAcl(
1315  PACL Acl,
1316  ULONG AclSize,
1318 );
1319 
1320 NTSYSAPI
1321 NTSTATUS
1322 NTAPI
1325  _In_ ULONG Revision
1326 );
1327 
1328 NTSYSAPI
1329 NTSTATUS
1330 NTAPI
1332  _Out_ PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
1333  _In_ ULONG Revision
1334 );
1335 
1336 NTSYSAPI
1337 NTSTATUS
1338 NTAPI
1340  _In_ PSECURITY_DESCRIPTOR pSourceSecurityDescriptor,
1341  _Out_ PSECURITY_DESCRIPTOR *pDestinationSecurityDescriptor
1342 );
1343 
1344 NTSYSAPI
1345 NTSTATUS
1346 NTAPI
1347 RtlDeleteAce(
1348  PACL Acl,
1349  ULONG AceIndex
1350 );
1351 
1352 NTSYSAPI
1353 BOOLEAN
1354 NTAPI
1356  PSID Sid1,
1357  PSID Sid2
1358 );
1359 
1360 NTSYSAPI
1361 BOOLEAN
1362 NTAPI
1363 RtlEqualSid (
1364  _In_ PSID Sid1,
1365  _In_ PSID Sid2
1366 );
1367 
1368 NTSYSAPI
1369 BOOLEAN
1370 NTAPI
1372  PACL Acl,
1373  PACE* Ace
1374 );
1375 
1376 NTSYSAPI
1377 PVOID
1378 NTAPI
1379 RtlFreeSid(
1381 );
1382 
1383 NTSYSAPI
1384 NTSTATUS
1385 NTAPI
1386 RtlGetAce(
1387  PACL Acl,
1388  ULONG AceIndex,
1389  PVOID *Ace
1390 );
1391 
1392 NTSYSAPI
1393 NTSTATUS
1394 NTAPI
1396  _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1398  _Out_ PULONG Revision
1399 );
1400 
1401 NTSYSAPI
1402 NTSTATUS
1403 NTAPI
1405  _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1407  _Out_ PACL *Dacl,
1409 );
1410 
1411 NTSYSAPI
1412 NTSTATUS
1413 NTAPI
1415  _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1417  _Out_ PACL* Sacl,
1419 );
1420 
1421 NTSYSAPI
1422 NTSTATUS
1423 NTAPI
1425  _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1426  _Out_ PSID *Group,
1428 );
1429 
1430 NTSYSAPI
1431 NTSTATUS
1432 NTAPI
1434  _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1435  _Out_ PSID *Owner,
1437 );
1438 
1439 NTSYSAPI
1440 BOOLEAN
1441 NTAPI
1443  _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1444  _Out_ PUCHAR RMControl
1445 );
1446 
1447 NTSYSAPI
1449 NTAPI
1451 
1452 NTSYSAPI
1453 NTSTATUS
1454 NTAPI
1456 
1458 NTSYSAPI
1459 NTSTATUS
1460 NTAPI
1462  _Out_ PSID Sid,
1463  _In_ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
1464  _In_ UCHAR SubAuthorityCount
1465 );
1466 
1467 NTSYSAPI
1468 ULONG
1469 NTAPI
1470 RtlLengthRequiredSid(IN ULONG SubAuthorityCount);
1471 
1473 NTSYSAPI
1474 ULONG
1475 NTAPI
1477  _In_ PSECURITY_DESCRIPTOR SecurityDescriptor);
1478 
1479 NTSYSAPI
1480 ULONG
1481 NTAPI
1482 RtlLengthSid(IN PSID Sid);
1483 
1484 NTSYSAPI
1485 NTSTATUS
1486 NTAPI
1488  _In_ PSECURITY_DESCRIPTOR AbsoluteSD,
1489  _Out_ PSECURITY_DESCRIPTOR SelfRelativeSD,
1490  _Inout_ PULONG BufferLength);
1491 
1492 NTSYSAPI
1493 VOID
1494 NTAPI
1496  PACCESS_MASK AccessMask,
1498 );
1499 
1500 #ifdef NTOS_MODE_USER
1501 
1502 NTSYSAPI
1503 NTSTATUS
1504 NTAPI
1506  PACL Acl,
1508  ULONG InformationLength,
1510 );
1511 
1512 #endif
1513 
1514 NTSYSAPI
1515 VOID
1516 NTAPI
1518  _In_ PVOID ReturnedState
1519 );
1520 
1522 NTSYSAPI
1523 NTSTATUS
1524 NTAPI
1526  _In_ PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor,
1527  _Out_writes_bytes_to_opt_(*AbsoluteSecurityDescriptorSize, *AbsoluteSecurityDescriptorSize) PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
1528  _Inout_ PULONG AbsoluteSecurityDescriptorSize,
1530  _Inout_ PULONG DaclSize,
1532  _Inout_ PULONG SaclSize,
1534  _Inout_ PULONG OwnerSize,
1536  _Inout_ PULONG PrimaryGroupSize
1537 );
1538 
1539 NTSYSAPI
1540 NTSTATUS
1541 NTAPI
1543  _Inout_ PSECURITY_DESCRIPTOR SelfRelativeSD,
1545 );
1546 
1547 NTSYSAPI
1548 NTSTATUS
1549 NTAPI
1551  _Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1553  _Out_ PULONG Revision
1554 );
1555 
1556 NTSYSAPI
1557 NTSTATUS
1558 NTAPI
1560  _In_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1561  _In_ SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
1562  _In_ SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet
1563 );
1564 
1566 NTSYSAPI
1567 NTSTATUS
1568 NTAPI
1570  _Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1571  _In_ BOOLEAN DaclPresent,
1572  _In_opt_ PACL Dacl,
1573  _In_opt_ BOOLEAN DaclDefaulted
1574 );
1575 
1577 NTSYSAPI
1578 NTSTATUS
1579 NTAPI
1581  _Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1583  _In_opt_ BOOLEAN GroupDefaulted
1584 );
1585 
1586 #ifdef NTOS_MODE_USER
1587 
1588 NTSYSAPI
1589 NTSTATUS
1590 NTAPI
1592  PACL Acl,
1594  ULONG InformationLength,
1596 );
1597 
1598 #endif
1599 
1601 NTSYSAPI
1602 NTSTATUS
1603 NTAPI
1605  _Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1607  _In_opt_ BOOLEAN OwnerDefaulted
1608 );
1609 
1610 NTSYSAPI
1611 NTSTATUS
1612 NTAPI
1614  _Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1615  _In_ BOOLEAN SaclPresent,
1616  _In_ PACL Sacl,
1617  _In_ BOOLEAN SaclDefaulted
1618 );
1619 
1620 NTSYSAPI
1621 VOID
1622 NTAPI
1624  _Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor,
1625  _In_ PUCHAR RMControl
1626 );
1627 
1628 NTSYSAPI
1629 PUCHAR
1630 NTAPI
1632  _In_ PSID Sid
1633 );
1634 
1635 NTSYSAPI
1636 PULONG
1637 NTAPI
1639  _In_ PSID Sid,
1640  _In_ ULONG SubAuthority
1641 );
1642 
1645 NTSYSAPI
1646 BOOLEAN
1647 NTAPI
1652 );
1653 
1654 NTSYSAPI
1655 BOOLEAN
1656 NTAPI
1658 
1659 NTSYSAPI
1660 BOOLEAN
1661 NTAPI
1662 RtlValidSid(IN PSID Sid);
1663 
1664 NTSYSAPI
1665 BOOLEAN
1666 NTAPI
1667 RtlValidAcl(PACL Acl);
1668 
1669 NTSYSAPI
1670 NTSTATUS
1671 NTAPI
1673  _In_ PSECURITY_DESCRIPTOR *ObjectDescriptor
1674 );
1675 
1676 NTSYSAPI
1677 NTSTATUS
1678 NTAPI
1680  _In_ PSECURITY_DESCRIPTOR ParentDescriptor,
1681  _In_ PSECURITY_DESCRIPTOR CreatorDescriptor,
1684  _In_ HANDLE Token,
1685  _In_ PGENERIC_MAPPING GenericMapping
1686 );
1687 
1688 NTSYSAPI
1689 NTSTATUS
1690 NTAPI
1692  _In_ PSECURITY_DESCRIPTOR ObjectDescriptor,
1694  _Out_ PSECURITY_DESCRIPTOR ResultantDescriptor,
1695  _In_ ULONG DescriptorLength,
1696  _Out_ PULONG ReturnLength
1697 );
1698 
1699 NTSYSAPI
1700 NTSTATUS
1701 NTAPI
1703  _In_ SECURITY_INFORMATION SecurityInformation,
1704  _In_ PSECURITY_DESCRIPTOR ModificationDescriptor,
1705  _Out_ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
1706  _In_ PGENERIC_MAPPING GenericMapping,
1707  _In_ HANDLE Token
1708 );
1709 
1710 //
1711 // Single-Character Functions
1712 //
1713 NTSYSAPI
1714 NTSTATUS
1715 NTAPI
1718  _In_ ULONG Base,
1719  _In_ ULONG Length,
1721 );
1722 
1723 NTSYSAPI
1724 CHAR
1725 NTAPI
1727 
1728 NTSYSAPI
1729 WCHAR
1730 NTAPI
1731 RtlUpcaseUnicodeChar(WCHAR Source);
1732 
1733 NTSYSAPI
1734 WCHAR
1735 NTAPI
1737 
1738 NTSYSAPI
1739 NTSTATUS
1740 NTAPI
1742  _In_ ULONG Value,
1743  _In_ ULONG Base,
1744  _In_ ULONG Length,
1745  _Out_ PCHAR String
1746 );
1747 
1748 NTSYSAPI
1749 NTSTATUS
1750 NTAPI
1752  _In_ ULONG Value,
1753  _In_opt_ ULONG Base,
1754  _In_opt_ ULONG Length,
1755  _Inout_ LPWSTR String
1756 );
1757 
1759 _At_(String->MaximumLength, _Const_)
1760 NTSYSAPI
1761 NTSTATUS
1762 NTAPI
1764  _In_ ULONG Value,
1765  _In_opt_ ULONG Base,
1766  _Inout_ PUNICODE_STRING String
1767 );
1768 
1769 NTSYSAPI
1770 NTSTATUS
1771 NTAPI
1773  PCSZ String,
1774  ULONG Base,
1775  PULONG Value
1776 );
1777 
1778 //
1779 // Byte Swap Functions
1780 //
1781 #ifdef NTOS_MODE_USER
1782 
1783 unsigned short __cdecl _byteswap_ushort(unsigned short);
1784 unsigned long __cdecl _byteswap_ulong (unsigned long);
1785 unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64);
1786 #ifdef _MSC_VER
1787 #pragma intrinsic(_byteswap_ushort)
1788 #pragma intrinsic(_byteswap_ulong)
1789 #pragma intrinsic(_byteswap_uint64)
1790 #endif // _MSC_VER
1791 #define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x))
1792 #define RtlUlongByteSwap(_x) _byteswap_ulong((_x))
1793 #define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
1794 
1795 #endif // NTOS_MODE_USER
1796 
1797 //
1798 // Unicode->Ansi String Functions
1799 //
1800 NTSYSAPI
1801 ULONG
1802 NTAPI
1804 
1805 #ifdef NTOS_MODE_USER
1806 
1807 #define RtlUnicodeStringToAnsiSize(STRING) ( \
1808  NLS_MB_CODE_PAGE_TAG ? \
1809  RtlxUnicodeStringToAnsiSize(STRING) : \
1810  ((STRING)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
1811 )
1812 
1813 #endif
1814 
1815 NTSYSAPI
1816 NTSTATUS
1817 NTAPI
1821  BOOLEAN AllocateDestinationString
1822 );
1823 
1824 //
1825 // Unicode->OEM String Functions
1826 //
1827 NTSYSAPI
1828 NTSTATUS
1829 NTAPI
1833  BOOLEAN AllocateDestinationString
1834 );
1835 
1838 //_At_(DestinationString->Buffer, _Post_bytecount_(DestinationString->Length))
1839 NTSYSAPI
1840 NTSTATUS
1841 NTAPI
1843  _When_(AllocateDestinationString, _Out_ _At_(DestinationString->Buffer, __drv_allocatesMem(Mem)))
1844  _When_(!AllocateDestinationString, _Inout_)
1847  _In_ BOOLEAN AllocateDestinationString
1848 );
1849 
1850 NTSYSAPI
1851 NTSTATUS
1852 NTAPI
1854  POEM_STRING DestinationString,
1855  PCUNICODE_STRING SourceString,
1856  BOOLEAN AllocateDestinationString
1857 );
1858 
1859 NTSYSAPI
1860 NTSTATUS
1861 NTAPI
1863  PCHAR OemString,
1864  ULONG OemSize,
1865  PULONG ResultSize,
1866  PCWCH UnicodeString,
1867  ULONG UnicodeSize
1868 );
1869 
1870 NTSYSAPI
1871 ULONG
1872 NTAPI
1874 
1875 #ifdef NTOS_MODE_USER
1876 
1877 #define RtlUnicodeStringToOemSize(STRING) ( \
1878  NLS_MB_OEM_CODE_PAGE_TAG ? \
1879  RtlxUnicodeStringToOemSize(STRING) : \
1880  ((STRING)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
1881 )
1882 
1883 #define RtlUnicodeStringToCountedOemSize(STRING) ( \
1884  (ULONG)(RtlUnicodeStringToOemSize(STRING) - sizeof(ANSI_NULL)) \
1885 )
1886 
1887 #endif
1888 
1889 NTSYSAPI
1890 NTSTATUS
1891 NTAPI
1893  PCHAR OemString,
1894  ULONG OemSize,
1895  PULONG ResultSize,
1896  PCWCH UnicodeString,
1897  ULONG UnicodeSize
1898 );
1899 
1900 //
1901 // Unicode->MultiByte String Functions
1902 //
1903 NTSYSAPI
1904 NTSTATUS
1905 NTAPI
1907  PCHAR MbString,
1908  ULONG MbSize,
1909  PULONG ResultSize,
1910  PCWCH UnicodeString,
1911  ULONG UnicodeSize
1912 );
1913 
1914 NTSYSAPI
1915 NTSTATUS
1916 NTAPI
1918  PCHAR MbString,
1919  ULONG MbSize,
1920  PULONG ResultSize,
1921  PCWCH UnicodeString,
1922  ULONG UnicodeSize
1923 );
1924 
1925 NTSYSAPI
1926 NTSTATUS
1927 NTAPI
1929  PULONG MbSize,
1930  PCWCH UnicodeString,
1931  ULONG UnicodeSize
1932 );
1933 
1934 NTSYSAPI
1935 ULONG
1936 NTAPI
1938 
1939 //
1940 // OEM to Unicode Functions
1941 //
1942 NTSYSAPI
1943 NTSTATUS
1944 NTAPI
1946  PUNICODE_STRING DestinationString,
1947  PCOEM_STRING SourceString,
1948  BOOLEAN AllocateDestinationString
1949 );
1950 
1952 NTSYSAPI
1953 NTSTATUS
1954 NTAPI
1957  _In_ ULONG MaxBytesInUnicodeString,
1961 );
1962 
1963 #ifdef NTOS_MODE_USER
1964 
1965 #define RtlOemStringToUnicodeSize(STRING) ( \
1966  NLS_MB_OEM_CODE_PAGE_TAG ? \
1967  RtlxOemStringToUnicodeSize(STRING) : \
1968  ((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
1969 )
1970 
1971 #define RtlOemStringToCountedUnicodeSize(STRING) ( \
1972  (ULONG)(RtlOemStringToUnicodeSize(STRING) - sizeof(UNICODE_NULL)) \
1973 )
1974 
1975 #endif
1976 
1977 //
1978 // Ansi->Unicode String Functions
1979 //
1981 NTSYSAPI
1982 WCHAR
1983 NTAPI
1985  _Inout_ PUCHAR *SourceCharacter);
1986 
1987 NTSYSAPI
1988 NTSTATUS
1989 NTAPI
1991  PUNICODE_STRING DestinationString,
1992  PCANSI_STRING SourceString,
1993  BOOLEAN AllocateDestinationString
1994 );
1995 
1996 NTSYSAPI
1997 ULONG
1998 NTAPI
2001 );
2002 
2003 #ifdef NTOS_MODE_USER
2004 
2005 #define RtlAnsiStringToUnicodeSize(STRING) ( \
2006  NLS_MB_CODE_PAGE_TAG ? \
2007  RtlxAnsiStringToUnicodeSize(STRING) : \
2008  ((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
2009 )
2010 
2011 #endif
2012 
2013 NTSYSAPI
2014 BOOLEAN
2015 NTAPI
2018  _In_ PCSZ Source
2019 );
2020 
2021 //
2022 // Unicode String Functions
2023 //
2024 NTSYSAPI
2025 NTSTATUS
2026 NTAPI
2029  PCWSTR Source
2030 );
2031 
2032 NTSYSAPI
2033 NTSTATUS
2034 NTAPI
2037  PCUNICODE_STRING Source
2038 );
2039 
2040 NTSYSAPI
2041 LONG
2042 NTAPI
2044  PCUNICODE_STRING String1,
2047 );
2048 
2049 NTSYSAPI
2050 VOID
2051 NTAPI
2053  PUNICODE_STRING DestinationString,
2054  PCUNICODE_STRING SourceString
2055 );
2056 
2057 NTSYSAPI
2058 BOOLEAN
2059 NTAPI
2061  PUNICODE_STRING DestinationString,
2062  PCWSTR SourceString
2063 );
2064 
2065 #ifdef NTOS_MODE_USER
2066 
2067 NTSYSAPI
2068 NTSTATUS
2069 NTAPI
2071  _Inout_ PUNICODE_STRING UniDest,
2072  _In_ PCUNICODE_STRING UniSource,
2073  _In_ BOOLEAN AllocateDestinationString
2074 );
2075 
2076 NTSYSAPI
2077 NTSTATUS
2078 NTAPI
2080  _In_ ULONG Flags,
2081  _In_ PCUNICODE_STRING SourceString,
2082  _Out_ PUNICODE_STRING DestinationString
2083 );
2084 
2085 //
2086 // Memory Functions
2087 //
2088 NTSYSAPI
2089 VOID
2090 NTAPI
2093  _In_ SIZE_T Length,
2094  _In_ ULONG Fill
2095 );
2096 
2097 NTSYSAPI
2098 VOID
2099 NTAPI
2102  _In_ SIZE_T Length,
2103  _In_ ULONGLONG Pattern
2104 );
2105 
2106 NTSYSAPI
2107 NTSTATUS
2108 NTAPI
2111  _In_reads_bytes_(Size) const VOID *Source,
2112  _In_ SIZE_T Size
2113 );
2114 
2115 NTSYSAPI
2116 SIZE_T
2117 NTAPI
2119  _In_ PVOID Source,
2120  _In_ SIZE_T Length,
2121  _In_ ULONG Pattern
2122 );
2123 
2124 #ifndef RtlEqualMemory
2125 #define RtlEqualMemory(Destination, Source, Length) \
2126  (!memcmp(Destination, Source, Length))
2127 #endif
2128 
2129 #define RtlCopyBytes RtlCopyMemory
2130 #define RtlFillBytes RtlFillMemory
2131 #define RtlZeroBytes RtlZeroMemory
2132 
2133 #endif
2134 
2135 NTSYSAPI
2136 BOOLEAN
2137 NTAPI
2139  PCUNICODE_STRING String1,
2142 );
2143 
2144 NTSYSAPI
2145 NTSTATUS
2146 NTAPI
2148  _In_ ULONG Flags,
2149  _In_ PCUNICODE_STRING SearchString,
2150  _In_ PCUNICODE_STRING MatchString,
2152 );
2153 
2155 NTSYSAPI
2156 VOID
2157 NTAPI
2159  _Inout_ _At_(UnicodeString->Buffer, __drv_freesMem(Mem))
2160  PUNICODE_STRING UnicodeString
2161 );
2162 
2163 NTSYSAPI
2164 VOID
2165 NTAPI
2167  _Inout_ PUNICODE_STRING String
2168 );
2169 
2170 NTSYSAPI
2171 NTSTATUS
2172 NTAPI
2174  _In_ CONST UNICODE_STRING *String,
2178 );
2179 
2181 _At_(DestinationString->Buffer, _Post_equal_to_(SourceString))
2182 _When_(SourceString != NULL,
2183 _At_(DestinationString->Length, _Post_equal_to_(_String_length_(SourceString) * sizeof(WCHAR)))
2184 _At_(DestinationString->MaximumLength, _Post_equal_to_(DestinationString->Length + sizeof(WCHAR))))
2185 _When_(SourceString == NULL,
2186 _At_(DestinationString->Length, _Post_equal_to_(0))
2187 _At_(DestinationString->MaximumLength, _Post_equal_to_(0)))
2188 NTSYSAPI
2189 VOID
2190 NTAPI
2192  _Out_ PUNICODE_STRING DestinationString,
2193  _In_opt_z_ __drv_aliasesMem PCWSTR SourceString
2194 );
2195 
2197 NTSYSAPI
2198 NTSTATUS
2199 NTAPI
2201  _Out_ PUNICODE_STRING DestinationString,
2202  _In_opt_z_ __drv_aliasesMem PCWSTR SourceString
2203 );
2204 
2205 NTSYSAPI
2206 BOOLEAN
2207 NTAPI
2209  _In_ CONST VOID* Buffer,
2210  _In_ INT Size,
2211  _Inout_opt_ INT* Flags
2212 );
2213 
2216 NTSYSAPI
2217 BOOLEAN
2218 NTAPI
2220  _In_ const STRING *String1,
2223 );
2224 
2227 NTSYSAPI
2228 BOOLEAN
2229 NTAPI
2231  _In_ PCUNICODE_STRING String1,
2232  _In_ PCUNICODE_STRING String2,
2233  _In_ BOOLEAN CaseInsensitive
2234 );
2235 
2237 NTSYSAPI
2238 VOID
2239 NTAPI
2241  _Inout_ PSTRING DestinationString,
2242  _In_ const STRING *SourceString
2243 );
2244 
2247 NTSYSAPI
2248 LONG
2249 NTAPI
2251  _In_ const STRING *String1,
2252  _In_ const STRING *String2,
2253  _In_ BOOLEAN CaseInSensitive
2254 );
2255 
2256 NTSYSAPI
2257 VOID
2258 NTAPI
2260  _Out_ PSTRING DestinationString,
2261  _In_opt_ const STRING *SourceString
2262 );
2263 
2266 NTSYSAPI
2267 BOOLEAN
2268 NTAPI
2270  _In_ const STRING *String1,
2271  _In_ const STRING *String2,
2272  _In_ BOOLEAN CaseInSensitive
2273 );
2274 
2276 NTSYSAPI
2277 NTSTATUS
2278 NTAPI
2280  _Inout_ PSTRING Destination,
2281  _In_ const STRING *Source
2282 );
2283 
2285 _When_(AllocateDestinationString, _Must_inspect_result_)
2286 NTSYSAPI
2287 NTSTATUS
2288 NTAPI
2290  _When_(AllocateDestinationString, _Out_ _At_(DestinationString->Buffer, __drv_allocatesMem(Mem)))
2291  _When_(!AllocateDestinationString, _Inout_)
2292  PUNICODE_STRING DestinationString,
2293  _In_ PCUNICODE_STRING SourceString,
2294  _In_ BOOLEAN AllocateDestinationString
2295 );
2296 
2298 NTSYSAPI
2299 NTSTATUS
2300 NTAPI
2302  _In_ PCUNICODE_STRING String,
2304  _Out_ PULONG Value
2305 );
2306 
2307 NTSYSAPI
2308 NTSTATUS
2309 NTAPI
2311  _In_ ULONG Flags,
2312  _In_ PCUNICODE_STRING String
2313 );
2314 
2315 //
2316 // Ansi String Functions
2317 //
2319 NTSYSAPI
2320 VOID
2321 NTAPI
2323  _Inout_ _At_(AnsiString->Buffer, __drv_freesMem(Mem))
2324  PANSI_STRING AnsiString
2325 );
2326 
2328 NTSYSAPI
2329 VOID
2330 NTAPI
2332  _Out_ PANSI_STRING DestinationString,
2333  _In_opt_z_ __drv_aliasesMem PCSZ SourceString
2334 );
2335 
2337 NTSYSAPI
2338 NTSTATUS
2339 NTAPI
2341  _Out_ PANSI_STRING DestinationString,
2342  _In_opt_z_ __drv_aliasesMem PCSZ SourceString
2343 );
2344 
2345 //
2346 // OEM String Functions
2347 //
2349 NTSYSAPI
2350 VOID
2351 NTAPI
2353  _Inout_ _At_(OemString->Buffer, __drv_freesMem(Mem))
2354  POEM_STRING OemString
2355 );
2356 
2357 //
2358 // MultiByte->Unicode String Functions
2359 //
2361 NTSYSAPI
2362 NTSTATUS
2363 NTAPI
2365  _Out_writes_bytes_to_(MaxBytesInUnicodeString, *BytesInUnicodeString) PWCH UnicodeString,
2366  _In_ ULONG MaxBytesInUnicodeString,
2367  _Out_opt_ PULONG BytesInUnicodeString,
2370 );
2371 
2373 NTSYSAPI
2374 NTSTATUS
2375 NTAPI
2377  _Out_ PULONG BytesInUnicodeString,
2380 );
2381 
2382 //
2383 // Atom Functions
2384 //
2385 NTSYSAPI
2386 NTSTATUS
2387 NTAPI
2389  _In_ PRTL_ATOM_TABLE AtomTable,
2390  _In_ PWSTR AtomName,
2392 );
2393 
2394 NTSYSAPI
2395 NTSTATUS
2396 NTAPI
2399  _Inout_ PRTL_ATOM_TABLE *AtomTable
2400 );
2401 
2402 NTSYSAPI
2403 NTSTATUS
2404 NTAPI
2406  _In_ PRTL_ATOM_TABLE AtomTable,
2407  _In_ RTL_ATOM Atom
2408 );
2409 
2410 NTSYSAPI
2411 NTSTATUS
2412 NTAPI
2414 
2415 NTSYSAPI
2416 NTSTATUS
2417 NTAPI
2419  _In_ PRTL_ATOM_TABLE AtomTable,
2420  _In_ RTL_ATOM Atom,
2421  _Out_opt_ PULONG RefCount,
2423  _Out_opt_z_bytecap_(*NameLength) PWSTR AtomName,
2424  _Inout_opt_ PULONG NameLength
2425 );
2426 
2427 NTSYSAPI
2428 NTSTATUS
2429 NTAPI
2431  _In_ PRTL_ATOM_TABLE AtomTable,
2432  _In_ RTL_ATOM Atom
2433 );
2434 
2435 NTSYSAPI
2436 NTSTATUS
2437 NTAPI
2439  _In_ PRTL_ATOM_TABLE AtomTable,
2440  _In_ PWSTR AtomName,
2441  _Out_ PRTL_ATOM Atom
2442 );
2443 
2444 //
2445 // Process Management Functions
2446 //
2447 NTSYSAPI
2448 PPEB
2449 NTAPI
2451  VOID
2452 );
2453 
2454 NTSYSAPI
2455 VOID
2456 NTAPI
2457 RtlAcquirePebLock(VOID);
2458 
2459 NTSYSAPI
2460 NTSTATUS
2461 NTAPI
2463  _Out_ PRTL_USER_PROCESS_PARAMETERS *ProcessParameters,
2464  _In_ PUNICODE_STRING ImagePathName,
2467  _In_opt_ PUNICODE_STRING CommandLine,
2469  _In_opt_ PUNICODE_STRING WindowTitle,
2470  _In_opt_ PUNICODE_STRING DesktopInfo,
2471  _In_opt_ PUNICODE_STRING ShellInfo,
2472  _In_opt_ PUNICODE_STRING RuntimeInfo
2473 );
2474 
2475 NTSYSAPI
2476 NTSTATUS
2477 NTAPI
2479  _In_ PUNICODE_STRING ImageFileName,
2481  _In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters,
2482  _In_opt_ PSECURITY_DESCRIPTOR ProcessSecutityDescriptor,
2483  _In_opt_ PSECURITY_DESCRIPTOR ThreadSecurityDescriptor,
2484  _In_opt_ HANDLE ParentProcess,
2485  _In_ BOOLEAN CurrentDirectory,
2486  _In_opt_ HANDLE DebugPort,
2487  _In_opt_ HANDLE ExceptionPort,
2489 );
2490 
2491 #if (NTDDI_VERSION >= NTDDI_WIN7)
2492 NTSYSAPI
2493 NTSTATUS
2494 NTAPI
2496  _In_ PVOID ThreadContext,
2497  _Out_ HANDLE *OutThreadHandle,
2503  _Reserved_ PVOID Reserved6,
2505  _Reserved_ PVOID Reserved8
2506 );
2507 #else
2508 NTSYSAPI
2509 NTSTATUS
2510 NTAPI
2513  _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor,
2514  _In_ BOOLEAN CreateSuspended,
2515  _In_ ULONG StackZeroBits,
2516  _In_ SIZE_T StackReserve,
2517  _In_ SIZE_T StackCommit,
2518  _In_ PTHREAD_START_ROUTINE StartAddress,
2520  _Out_opt_ PHANDLE ThreadHandle,
2522 );
2523 #endif
2524 
2525 NTSYSAPI
2527 NTAPI
2529  _In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters);
2530 
2531 NTSYSAPI
2532 NTSTATUS
2533 NTAPI
2535  _In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters);
2536 
2537 NTSYSAPI
2538 VOID
2539 NTAPI
2541  _In_ NTSTATUS Status);
2542 
2543 NTSYSAPI
2544 VOID
2545 NTAPI
2548  _Out_ PCONTEXT ThreadContext,
2549  _In_opt_ PVOID ThreadStartParam,
2550  _In_ PTHREAD_START_ROUTINE ThreadStartAddress,
2551  _In_ PINITIAL_TEB InitialTeb
2552 );
2553 
2554 #ifdef _M_AMD64
2555 typedef struct _WOW64_CONTEXT *PWOW64_CONTEXT;
2556 
2557 NTSYSAPI
2558 NTSTATUS
2559 NTAPI
2560 RtlWow64GetThreadContext(
2561  _In_ HANDLE ThreadHandle,
2562  _Inout_ PWOW64_CONTEXT ThreadContext
2563 );
2564 
2565 
2566 NTSYSAPI
2567 NTSTATUS
2568 NTAPI
2569 RtlWow64SetThreadContext(
2570  _In_ HANDLE ThreadHandle,
2571  _In_ PWOW64_CONTEXT ThreadContext
2572 );
2573 #endif
2574 
2575 NTSYSAPI
2576 BOOLEAN
2577 NTAPI
2579 
2580 NTSYSAPI
2582 NTAPI
2584  _In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters);
2585 
2586 NTSYSAPI
2587 VOID
2588 NTAPI
2589 RtlReleasePebLock(VOID);
2590 
2591 NTSYSAPI
2592 NTSTATUS
2593 NTAPI
2596  _In_ HANDLE Thread,
2597  _In_ PVOID CallSite,
2598  _In_ ULONG ArgumentCount,
2599  _In_ PULONG Arguments,
2600  _In_ BOOLEAN PassContext,
2601  _In_ BOOLEAN AlreadySuspended
2602 );
2603 
2604 NTSYSAPI
2605 NTSTATUS
2606 __cdecl
2608  _In_ BOOLEAN NewValue,
2609  _Out_opt_ PBOOLEAN OldValue,
2610  _In_ BOOLEAN NeedBreaks
2611 );
2612 
2613 NTSYSAPI
2614 NTSTATUS
2615 __cdecl
2617  _In_ BOOLEAN NewValue,
2618  _Out_opt_ PBOOLEAN OldValue,
2619  _In_ BOOLEAN NeedBreaks
2620 );
2621 
2622 NTSYSAPI
2623 ULONG
2624 NTAPI
2626  VOID
2627 );
2628 
2629 #define NtCurrentPeb() (NtCurrentTeb()->ProcessEnvironmentBlock)
2630 
2631 //
2632 // Thread Pool Functions
2633 //
2634 //
2635 NTSTATUS
2636 NTAPI
2638  _In_ PRTL_START_POOL_THREAD StartPoolThread,
2639  _In_ PRTL_EXIT_POOL_THREAD ExitPoolThread
2640 );
2641 
2642 NTSYSAPI
2643 NTSTATUS
2644 NTAPI
2646  _In_ HANDLE hWaitHandle,
2647  _In_opt_ HANDLE hCompletionEvent
2648 );
2649 
2650 NTSYSAPI
2651 NTSTATUS
2652 NTAPI
2654  _In_ HANDLE hWaitHandle
2655 );
2656 
2657 NTSYSAPI
2658 NTSTATUS
2659 NTAPI
2663  _In_ ULONG Flags
2664 );
2665 
2666 NTSYSAPI
2667 NTSTATUS
2668 NTAPI
2672  _In_ ULONG Flags
2673 );
2674 
2675 NTSYSAPI
2676 NTSTATUS
2677 NTAPI
2679  _In_ PHANDLE phNewWaitObject,
2682  _In_ PVOID pvContext,
2683  _In_ ULONG ulMilliseconds,
2684  _In_ ULONG ulFlags
2685 );
2686 
2687 //
2688 // Environment/Path Functions
2689 //
2690 NTSYSAPI
2691 NTSTATUS
2692 NTAPI
2694  _In_ BOOLEAN Inherit,
2695  _Out_ PWSTR *Environment
2696 );
2697 
2698 NTSYSAPI
2699 NTSTATUS
2700 NTAPI
2702  _In_ PUNICODE_STRING DllName,
2703  _Out_ PUNICODE_STRING RealName,
2704  _Out_ PUNICODE_STRING LocalName
2705 );
2706 
2707 NTSYSAPI
2708 VOID
2709 NTAPI
2711  _In_ PWSTR Environment
2712 );
2713 
2714 NTSYSAPI
2715 BOOLEAN
2716 NTAPI
2719 );
2720 
2721 NTSYSAPI
2723 NTAPI
2725  _In_ PCWSTR Path
2726 );
2727 
2728 NTSYSAPI
2729 ULONG
2730 NTAPI
2732  _In_ PCWSTR Path,
2735  _In_ ULONG BufferSize,
2736  _Out_ PWSTR Buffer,
2737  _Out_ PWSTR *PartName
2738 );
2739 
2740 NTSYSAPI
2741 NTSTATUS
2742 NTAPI
2744  _In_ ULONG Flags,
2745  _In_ PUNICODE_STRING PathString,
2746  _In_ PUNICODE_STRING FileNameString,
2747  _In_ PUNICODE_STRING ExtensionString,
2748  _In_ PUNICODE_STRING CallerBuffer,
2750  _Out_opt_ PUNICODE_STRING* FullNameOut,
2751  _Out_opt_ PSIZE_T FilePartSize,
2753 );
2754 
2755 NTSYSAPI
2756 BOOLEAN
2757 NTAPI
2759  _In_opt_z_ PCWSTR DosPathName,
2760  _Out_ PUNICODE_STRING NtPathName,
2761  _Out_opt_ PCWSTR *NtFileNamePart,
2762  _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo
2763 );
2764 
2765 NTSYSAPI
2766 BOOLEAN
2767 NTAPI
2770  _Out_ PUNICODE_STRING NtName,
2771  _Out_ PCWSTR *PartName,
2772  _Out_ PRTL_RELATIVE_NAME_U RelativeName
2773 );
2774 
2775 _At_(Destination->Buffer, _Out_bytecap_(Destination->MaximumLength))
2776 NTSYSAPI
2777 NTSTATUS
2778 NTAPI
2780  _In_z_ PWSTR Environment,
2782  _Inout_ PUNICODE_STRING Destination,
2783  _Out_ PULONG Length
2784 );
2785 
2786 NTSYSAPI
2787 ULONG
2788 NTAPI
2790  _In_ ULONG MaximumLength,
2791  _Out_bytecap_(MaximumLength) PWSTR Buffer
2792 );
2793 
2794 NTSYSAPI
2795 ULONG
2796 NTAPI
2799  _In_ ULONG Size,
2800  _Out_z_bytecap_(Size) PWSTR Buffer,
2802 );
2803 
2804 #if (NTDDI_VERSION >= NTDDI_WIN7)
2805 NTSYSAPI
2806 NTSTATUS
2807 NTAPI
2809  _In_ PWSTR FileName,
2810  _In_ ULONG BufferLength,
2811  _Out_ PWSTR Buffer,
2812  _Out_opt_ PWSTR *FilePart,
2813  _Out_opt_ RTL_PATH_TYPE *InputPathType
2814  );
2815 #endif
2816 
2817 NTSTATUS
2818 NTAPI
2820  _In_ PUNICODE_STRING FileName,
2824  _Out_opt_ PSIZE_T FilePartSize,
2828 );
2829 
2830 NTSYSAPI
2831 NTSTATUS
2832 NTAPI
2834  _Reserved_ ULONG Flags,
2835  _In_ PCUNICODE_STRING PathString,
2836  _Out_ PULONG Length
2837 );
2838 
2839 NTSYSAPI
2840 ULONG
2841 NTAPI
2843  VOID
2844 );
2845 
2846 NTSYSAPI
2847 ULONG
2848 NTAPI
2850  _In_ PCWSTR Name
2851 );
2852 
2853 NTSYSAPI
2854 ULONG
2855 NTAPI
2858 );
2859 
2862 NTSYSAPI
2863 BOOLEAN
2864 NTAPI
2869 );
2870 
2871 NTSYSAPI
2872 NTSTATUS
2873 NTAPI
2875  _In_opt_ PWSTR Environment,
2876  _In_ PUNICODE_STRING Name,
2877  _Out_ PUNICODE_STRING Value
2878 );
2879 
2880 VOID
2881 NTAPI
2883  _In_ PRTL_RELATIVE_NAME_U RelativeName
2884 );
2885 
2886 NTSYSAPI
2887 NTSTATUS
2888 NTAPI
2891 );
2892 
2893 NTSYSAPI
2894 NTSTATUS
2895 NTAPI
2897  _In_z_ PWSTR *Environment,
2898  _In_ PUNICODE_STRING Name,
2899  _In_ PUNICODE_STRING Value
2900 );
2901 
2902 //
2903 // Critical Section/Resource Functions
2904 //
2905 NTSYSAPI
2906 NTSTATUS
2907 NTAPI
2910 );
2911 
2912 NTSYSAPI
2913 NTSTATUS
2914 NTAPI
2916  _In_ PRTL_CRITICAL_SECTION CriticalSection
2917 );
2918 
2919 NTSYSAPI
2920 NTSTATUS
2921 NTAPI
2923  _In_ PRTL_CRITICAL_SECTION CriticalSection
2924 );
2925 
2926 NTSYSAPI
2927 NTSTATUS
2928 NTAPI
2930  _In_ PRTL_CRITICAL_SECTION CriticalSection,
2931  _In_ ULONG SpinCount
2932 );
2933 
2934 NTSYSAPI
2935 NTSTATUS
2936 NTAPI
2938  _In_ PRTL_CRITICAL_SECTION CriticalSection
2939 );
2940 
2941 NTSYSAPI
2942 BOOLEAN
2943 NTAPI
2945  _In_ PRTL_CRITICAL_SECTION CriticalSection
2946 );
2947 
2948 NTSYSAPI
2949 VOID
2950 NTAPI
2952  _In_ PRTL_CRITICAL_SECTION CriticalSection
2953 );
2954 
2955 NTSYSAPI
2956 NTSTATUS
2957 NTAPI
2959  _In_ PRTL_CRITICAL_SECTION CriticalSection
2960 );
2961 
2962 NTSYSAPI
2963 BOOLEAN
2964 NTAPI
2967  _In_ BOOLEAN Wait
2968 );
2969 
2970 NTSYSAPI
2971 BOOLEAN
2972 NTAPI
2974  _In_ PRTL_RESOURCE Resource,
2975  _In_ BOOLEAN Wait
2976 );
2977 
2978 NTSYSAPI
2979 VOID
2980 NTAPI
2982  _In_ PRTL_RESOURCE Resource
2983 );
2984 
2985 NTSYSAPI
2986 VOID
2987 NTAPI
2989  _In_ PRTL_RESOURCE Resource
2990 );
2991 
2992 NTSYSAPI
2993 VOID
2994 NTAPI
2996  _In_ PRTL_RESOURCE Resource
2997 );
2998 
2999 NTSYSAPI
3000 VOID
3001 NTAPI
3003  _In_ PRTL_RESOURCE Resource
3004 );
3005 
3006 NTSYSAPI
3007 VOID
3008 NTAPI
3010  _In_ PRTL_RESOURCE Resource
3011 );
3012 
3013 NTSYSAPI
3014 VOID
3015 NTAPI
3017  _In_ PRTL_RESOURCE Resource
3018 );
3019 
3020 //
3021 // Compression Functions
3022 //
3023 NTSYSAPI //NT_RTL_COMPRESS_API
3024 NTSTATUS
3025 NTAPI
3027  _In_ USHORT CompressionFormatAndEngine,
3028  _In_reads_bytes_(UncompressedBufferSize) PUCHAR UncompressedBuffer,
3031  _In_ ULONG CompressedBufferSize,
3032  _In_ ULONG UncompressedChunkSize,
3033  _Out_ PULONG FinalCompressedSize,
3035 );
3036 
3038 NTSYSAPI //NT_RTL_COMPRESS_API
3039 NTSTATUS
3040 NTAPI
3042  _In_ USHORT CompressionFormat,
3043  _Out_writes_bytes_to_(UncompressedBufferSize, *FinalUncompressedSize) PUCHAR UncompressedBuffer,
3044  _In_ ULONG UncompressedBufferSize,
3045  _In_reads_bytes_(CompressedBufferSize) PUCHAR CompressedBuffer,
3046  _In_ ULONG CompressedBufferSize,
3048 );
3049 
3050 NTSYSAPI
3051 NTSTATUS
3052 NTAPI
3054  _In_ USHORT CompressionFormatAndEngine,
3055  _Out_ PULONG CompressBufferWorkSpaceSize,
3056  _Out_ PULONG CompressFragmentWorkSpaceSize
3057 );
3058 
3059 //
3060 // Frame Functions
3061 //
3062 NTSYSAPI
3063 VOID
3064 NTAPI
3065 RtlPopFrame(
3066  _In_ PTEB_ACTIVE_FRAME Frame
3067 );
3068 
3069 NTSYSAPI
3070 VOID
3071 NTAPI
3072 RtlPushFrame(
3073  _In_ PTEB_ACTIVE_FRAME Frame
3074 );
3075 
3076 NTSYSAPI
3078 NTAPI
3079 RtlGetFrame(
3080  VOID
3081 );
3082 
3083 //
3084 // Debug Info Functions
3085 //
3086 NTSYSAPI
3088 NTAPI
3090  _In_ ULONG Size,
3091  _In_ BOOLEAN EventPair
3092 );
3093 
3094 NTSYSAPI
3095 NTSTATUS
3096 NTAPI
3098 
3099 NTSYSAPI
3100 NTSTATUS
3101 NTAPI
3104  _In_ ULONG DebugInfoClassMask,
3105  _Inout_ PRTL_DEBUG_INFORMATION DebugBuffer
3106 );
3107 
3108 //
3109 // Bitmap Functions
3110 //
3111 NTSYSAPI
3112 BOOLEAN
3113 NTAPI
3115  _In_ PRTL_BITMAP BitMapHeader,
3117  _In_ ULONG Length
3118 );
3119 
3120 NTSYSAPI
3121 BOOLEAN
3122 NTAPI
3124  _In_ PRTL_BITMAP BitMapHeader,
3125  _In_ ULONG StartingIndex,
3126  _In_ ULONG Length
3127 );
3128 
3129 NTSYSAPI
3130 VOID
3131 NTAPI
3133  _In_ PRTL_BITMAP BitMapHeader
3134 );
3135 
3136 NTSYSAPI
3137 VOID
3138 NTAPI
3139 RtlClearBits(
3140  _In_ PRTL_BITMAP BitMapHeader,
3141  _In_range_(0, BitMapHeader->SizeOfBitMap - NumberToClear) ULONG StartingIndex,
3142  _In_range_(0, BitMapHeader->SizeOfBitMap - StartingIndex) ULONG NumberToClear
3143 );
3144 
3145 NTSYSAPI
3146 ULONG
3147 NTAPI
3149  _In_ PRTL_BITMAP BitMapHeader,
3152 );
3153 
3154 NTSYSAPI
3155 ULONG
3156 NTAPI
3158  _In_ PRTL_BITMAP BitMapHeader,
3159  _In_ ULONG NumberToFind,
3160  _In_ ULONG HintIndex
3161 );
3162 
3163 NTSYSAPI
3164 ULONG
3165 NTAPI
3167  _In_ PRTL_BITMAP BitMapHeader,
3168  _Out_ PULONG StartingIndex
3169 );
3170 
3171 NTSYSAPI
3172 ULONG
3173 NTAPI
3175  _In_ PRTL_BITMAP BitMapHeader,
3176  _Out_writes_to_(SizeOfRunArray, return) PRTL_BITMAP_RUN RunArray,
3177  _In_range_(>, 0) ULONG SizeOfRunArray,
3178  _In_ BOOLEAN LocateLongestRuns
3179 );
3180 
3181 NTSYSAPI
3182 ULONG
3183 NTAPI
3185  _In_ PRTL_BITMAP BitMapHeader,
3186  _In_ ULONG FromIndex,
3187  _Out_ PULONG StartingRunIndex
3188 );
3189 
3190 NTSYSAPI
3191 CCHAR
3192 NTAPI
3194  _In_ ULONGLONG Value
3195 );
3196 
3197 NTSYSAPI
3198 CCHAR
3199 NTAPI
3201  _In_ ULONGLONG Value
3202 );
3203 
3204 NTSYSAPI
3205 ULONG
3206 NTAPI
3208  _In_ PRTL_BITMAP BitMapHeader,
3209  _In_ ULONG FromIndex,
3210  _Out_ PULONG StartingRunIndex
3211 );
3212 
3213 NTSYSAPI
3214 ULONG
3215 NTAPI
3217  _In_ PRTL_BITMAP BitMapHeader,
3218  _In_ ULONG FromIndex,
3219  _Out_ PULONG StartingRunIndex
3220 );
3221 
3222 NTSYSAPI
3223 ULONG
3224 NTAPI
3226  _In_ PRTL_BITMAP BitMapHeader,
3227  _In_ ULONG NumberToFind,
3228  _In_ ULONG HintIndex
3229 );
3230 
3231 NTSYSAPI
3232 ULONG
3233 NTAPI
3235  _In_ PRTL_BITMAP BitMapHeader,
3236  _In_ ULONG NumberToFind,
3237  _In_ ULONG HintIndex
3238 );
3239 
3240 #ifdef _REACTOS_ // ReactOS improvement
3241 _At_(BitMapHeader->SizeOfBitMap, _Post_equal_to_(SizeOfBitMap))
3242 _At_(BitMapHeader->Buffer, _Post_equal_to_(BitMapBuffer))
3243 #endif
3244 NTSYSAPI
3245 VOID
3246 NTAPI
3248  _Out_ PRTL_BITMAP BitMapHeader,
3249  _In_opt_ __drv_aliasesMem PULONG BitMapBuffer,
3250  _In_opt_ ULONG SizeOfBitMap
3251 );
3252 
3253 NTSYSAPI
3254 ULONG
3255 NTAPI
3257  _In_ PRTL_BITMAP BitMapHeader
3258 );
3259 
3260 NTSYSAPI
3261 ULONG
3262 NTAPI
3264  _In_ PRTL_BITMAP BitMapHeader
3265 );
3266 
3267 NTSYSAPI
3268 VOID
3269 NTAPI
3270 RtlSetBit(
3271  _In_ PRTL_BITMAP BitMapHeader,
3272  _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber
3273 );
3274 
3275 NTSYSAPI
3276 VOID
3277 NTAPI
3278 RtlSetBits(
3279  _In_ PRTL_BITMAP BitMapHeader,
3280  _In_range_(0, BitMapHeader->SizeOfBitMap - NumberToSet) ULONG StartingIndex,
3281  _In_range_(0, BitMapHeader->SizeOfBitMap - StartingIndex) ULONG NumberToSet
3282 );
3283 
3284 NTSYSAPI
3285 VOID
3286 NTAPI
3288  _In_ PRTL_BITMAP BitMapHeader
3289 );
3290 
3292 NTSYSAPI
3293 BOOLEAN
3294 NTAPI
3295 RtlTestBit(
3296  _In_ PRTL_BITMAP BitMapHeader,
3297  _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber
3298 );
3299 
3300 //
3301 // Timer Functions
3302 //
3303 NTSYSAPI
3304 NTSTATUS
3305 NTAPI
3307  _In_ HANDLE TimerQueue,
3308  _In_ PHANDLE phNewTimer,
3311  _In_ ULONG DueTime,
3312  _In_ ULONG Period,
3313  _In_ ULONG Flags
3314 );
3315 
3316 NTSYSAPI
3317 NTSTATUS
3318 NTAPI
3319 RtlCreateTimerQueue(PHANDLE TimerQueue);
3320 
3321 NTSYSAPI
3322 NTSTATUS
3323 NTAPI
3325  _In_ HANDLE TimerQueue,
3326  _In_ HANDLE Timer,
3327  _In_ HANDLE CompletionEvent
3328 );
3329 
3330 NTSYSAPI
3331 NTSTATUS
3332 NTAPI
3334  _In_ HANDLE TimerQueue,
3335  _In_ HANDLE Timer,
3336  _In_ ULONG DueTime,
3337  _In_ ULONG Period
3338 );
3339 
3340 NTSYSAPI
3341 NTSTATUS
3342 NTAPI
3344  _In_ HANDLE TimerQueue,
3345  _In_opt_ HANDLE CompletionEvent
3346 );
3347 
3348 NTSYSAPI
3349 NTSTATUS
3350 NTAPI
3351 RtlDeleteTimerQueue(HANDLE TimerQueue);
3352 
3353 //
3354 // SList functions
3355 //
3357 FASTCALL
3359  _Inout_ PSLIST_HEADER ListHead,
3362  _In_ ULONG Count
3363 );
3364 
3365 //
3366 // Range List functions
3367 //
3368 NTSYSAPI
3369 VOID
3370 NTAPI
3372  _Inout_ PRTL_RANGE_LIST RangeList
3373 );
3374 
3375 NTSYSAPI
3376 VOID
3377 NTAPI
3379  _In_ PRTL_RANGE_LIST RangeList
3380 );
3381 
3382 NTSYSAPI
3383 NTSTATUS
3384 NTAPI
3385 RtlAddRange(
3386  _Inout_ PRTL_RANGE_LIST RangeList,
3388  _In_ ULONGLONG End,
3389  _In_ UCHAR Attributes,
3390  _In_ ULONG Flags,
3392  _In_opt_ PVOID Owner
3393 );
3394 
3395 //
3396 // Debug Functions
3397 //
3398 ULONG
3399 __cdecl
3400 DbgPrint(
3402  ...
3403 );
3404 
3405 NTSYSAPI
3406 ULONG
3407 __cdecl
3408 DbgPrintEx(
3410  _In_ ULONG Level,
3412  ...
3413 );
3414 
3415 NTSYSAPI
3416 ULONG
3417 NTAPI
3418 DbgPrompt(
3419  _In_z_ PCCH Prompt,
3422 );
3423 
3424 #undef DbgBreakPoint
3425 VOID
3426 NTAPI
3428  VOID
3429 );
3430 
3431 VOID
3432 NTAPI
3434  _In_ PSTRING Name,
3435  _In_ PVOID Base,
3436  _In_ ULONG_PTR ProcessId
3437 );
3438 
3439 VOID
3440 NTAPI
3442  _In_ PSTRING Name,
3443  _In_ PVOID Base,
3444  _In_ ULONG_PTR ProcessId
3445 );
3446 
3447 VOID
3448 NTAPI
3450  _In_ PCCH Name,
3451  _In_ PCCH Command
3452 );
3453 
3454 //
3455 // Generic Table Functions
3456 //
3457 #if defined(NTOS_MODE_USER) || defined(_NTIFS_)
3458 NTSYSAPI
3459 PVOID
3460 NTAPI
3462  _In_ PRTL_GENERIC_TABLE Table,
3463  _In_reads_bytes_(BufferSize) PVOID Buffer,
3464  _In_ CLONG BufferSize,
3465  _Out_opt_ PBOOLEAN NewElement
3466 );
3467 
3468 NTSYSAPI
3469 PVOID
3470 NTAPI
3472  _In_ PRTL_GENERIC_TABLE Table,
3473  _In_reads_bytes_(BufferSize) PVOID Buffer,
3474  _In_ CLONG BufferSize,
3475  _Out_opt_ PBOOLEAN NewElement,
3476  _In_ PVOID NodeOrParent,
3477  _In_ TABLE_SEARCH_RESULT SearchResult
3478 );
3479 
3480 NTSYSAPI
3481 BOOLEAN
3482 NTAPI
3484  _In_ PRTL_GENERIC_TABLE Table
3485 );
3486 
3487 NTSYSAPI
3488 PVOID
3489 NTAPI
3491  _In_ PRTL_GENERIC_TABLE Table,
3492  _In_ PVOID Buffer,
3493  _Out_ PVOID *NodeOrParent,
3494  _Out_ TABLE_SEARCH_RESULT *SearchResult
3495 );
3496 #endif
3497 
3498 //
3499 // Handle Table Functions
3500 //
3501 NTSYSAPI
3503 NTAPI
3507 );
3508 
3509 NTSYSAPI
3510 VOID
3511 NTAPI
3514 
3515 NTSYSAPI
3516 BOOLEAN
3517 NTAPI
3521 );
3522 
3523 NTSYSAPI
3524 VOID
3525 NTAPI
3527  _In_ ULONG TableSize,
3528  _In_ ULONG HandleSize,
3530 );
3531 
3532 NTSYSAPI
3533 BOOLEAN
3534 NTAPI
3538 );
3539 
3540 _Success_(return!=FALSE)
3541 NTSYSAPI
3542 BOOLEAN
3543 NTAPI
3548 );
3549 
3550 //
3551 // PE Functions
3552 //
3553 NTSYSAPI
3554 NTSTATUS
3555 NTAPI
3557  _In_ PVOID BaseAddress,
3558  _In_ ULONG Type,
3559  _In_ ULONG Language,
3560  _In_ ULONG MessageId,
3561  _Out_ PMESSAGE_RESOURCE_ENTRY *MessageResourceEntry
3562 );
3563 
3564 NTSYSAPI
3565 ULONG
3566 NTAPI
3567 RtlGetNtGlobalFlags(VOID);
3568 
3569 _Success_(return!=NULL)
3570 NTSYSAPI
3571 PVOID
3572 NTAPI
3574  _In_ PVOID BaseAddress,
3577  _Out_ PULONG Size
3578 );
3579 
3580 NTSYSAPI
3581 PVOID
3582 NTAPI
3584  _In_ PIMAGE_NT_HEADERS NtHeader,
3585  _In_ PVOID BaseAddress,
3586  _In_ ULONG Rva,
3587  _Inout_opt_ PIMAGE_SECTION_HEADER *SectionHeader
3588 );
3589 
3590 NTSYSAPI
3592 NTAPI
3594  _In_ PVOID BaseAddress);
3595 
3596 NTSYSAPI
3597 NTSTATUS
3598 NTAPI
3600  _In_ ULONG Flags,
3601  _In_ PVOID BaseAddress,
3602  _In_ ULONGLONG Size,
3603  _Out_ PIMAGE_NT_HEADERS *NtHeader
3604 );
3605 
3606 NTSYSAPI
3608 NTAPI
3610  _In_ PIMAGE_NT_HEADERS NtHeader,
3611  _In_ PVOID BaseAddress,
3612  _In_ ULONG Rva
3613 );
3614 
3615 NTSYSAPI
3616 ULONG
3617 NTAPI
3619  _In_ PVOID NewAddress,
3620  _In_ LONGLONG AdditionalBias,
3621  _In_ PCCH LoaderName,
3622  _In_ ULONG Success,
3623  _In_ ULONG Conflict,
3624  _In_ ULONG Invalid
3625 );
3626 
3627 //
3628 // Activation Context Functions
3629 //
3630 #ifdef NTOS_MODE_USER
3631 NTSYSAPI
3632 NTSTATUS
3633 NTAPI
3635  _In_ ULONG Flags,
3636  _In_ PTEB Teb,
3637  _In_ PVOID Context,
3639 );
3640 
3641 NTSYSAPI
3642 NTSTATUS
3643 NTAPI
3645  _In_ ULONG Flags,
3646  _In_ HANDLE Handle,
3648 );
3649 
3650 NTSYSAPI
3651 VOID
3652 NTAPI
3655 );
3656 
3657 NTSYSAPI
3659 FASTCALL
3661  _In_ PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame,
3663 );
3664 
3665 NTSYSAPI
3666 NTSTATUS
3667 NTAPI
3670 );
3671 
3672 NTSYSAPI
3673 NTSTATUS
3674 NTAPI
3676  _In_ ULONG Flags,
3677  _In_ PACTIVATION_CONTEXT_DATA ActivationContextData,
3678  _In_ ULONG ExtraBytes,
3679  _In_ PVOID NotificationRoutine,
3682 );
3683 
3684 NTSYSAPI
3685 NTSTATUS
3686 NTAPI
3688  _In_ PVOID *Context
3689 );
3690 
3691 NTSYSAPI
3692 VOID
3693 NTAPI
3695  _In_ HANDLE handle
3696 );
3697 
3698 NTSYSAPI
3699 NTSTATUS
3700 NTAPI
3702  _In_ ULONG dwFlags,
3703  _In_ ULONG_PTR ulCookie
3704 );
3705 
3706 NTSYSAPI
3707 VOID
3708 NTAPI
3711 );
3712 
3713 NTSYSAPI
3714 VOID
3715 NTAPI
3717 
3718 NTSYSAPI
3720 FASTCALL
3722  _In_ PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame
3723 );
3724 
3725 NTSYSAPI
3726 NTSTATUS
3727 NTAPI
3729  _In_ ULONG Flags,
3730  _In_ PUNICODE_STRING OriginalName,
3735  _In_ PULONG NewFlags,
3736  _In_ PSIZE_T FileNameSize,
3738 );
3739 
3740 NTSYSAPI
3741 NTSTATUS
3742 NTAPI
3744  _In_ ULONG dwFlags,
3745  _In_ const GUID *ExtensionGuid,
3746  _In_ ULONG SectionType,
3747  _In_ const UNICODE_STRING *SectionName,
3748  _Inout_ PVOID ReturnedData
3749 );
3750 
3751 NTSYSAPI
3752 NTSTATUS
3753 NTAPI
3755  _In_ DWORD dwFlags,
3757  _In_opt_ PVOID pvSubInstance,
3758  _In_ ULONG ulInfoClass,
3759  _Out_bytecap_(cbBuffer) PVOID pvBuffer,
3761  _Out_opt_ SIZE_T *pcbWrittenOrRequired
3762 );
3763 
3764 NTSYSAPI
3765 NTSTATUS
3766 NTAPI
3768  _In_ ULONG ulInfoClass,
3769  _Out_bytecap_(cbBuffer) PVOID pvBuffer,
3771  _Out_opt_ SIZE_T *pcbWrittenOrRequired
3772 );
3773 
3774 NTSYSAPI
3775 NTSTATUS
3776 NTAPI
3778  PVOID Context
3779 );
3780 
3781 //
3782 // WOW64 Functions
3783 //
3784 NTSYSAPI
3785 NTSTATUS
3786 NTAPI
3788  _In_ BOOLEAN Wow64FsEnableRedirection
3789 );
3790 
3791 NTSYSAPI
3792 NTSTATUS
3793 NTAPI
3795  _In_ PVOID Wow64FsEnableRedirection,
3796  _Out_ PVOID *OldFsRedirectionLevel
3797 );
3798 
3799 #endif
3800 
3801 //
3802 // Registry Functions
3803 //
3806 NTSYSAPI
3807 NTSTATUS
3808 NTAPI
3810  _In_ ULONG RelativeTo,
3811  _In_ PWSTR Path
3812 );
3813 
3814 NTSYSAPI
3815 NTSTATUS
3816 NTAPI
3818  _In_ ULONG RelativeTo,
3819  _In_ PWSTR Path
3820 );
3821 
3822 NTSYSAPI
3823 NTSTATUS
3824 NTAPI
3826  _Out_ _At_(KeyPath->Buffer, __drv_allocatesMem(Mem) _Post_bytecap_(KeyPath->MaximumLength) _Post_bytecount_(KeyPath->Length))
3827  PUNICODE_STRING KeyPath
3828 );
3829 
3830 NTSYSAPI
3831 NTSTATUS
3832 NTAPI
3834  _In_ ACCESS_MASK DesiredAccess,
3836 );
3837 
3839 NTSYSAPI
3840 NTSTATUS
3841 NTAPI
3843  _In_ ULONG RelativeTo,
3844  _In_ PCWSTR Path,
3847  _In_opt_ PVOID Context,
3848  _In_opt_ PVOID Environment
3849 );
3850 
3852 NTSYSAPI
3853 NTSTATUS
3854 NTAPI
3856  _In_ ULONG RelativeTo,
3857  _In_ PCWSTR Path,
3862 );
3863 
3864 #ifdef NTOS_MODE_USER
3865 NTSYSAPI
3866 NTSTATUS
3867 NTAPI
3869  _Out_ HANDLE KeyHandle,
3870  _In_ ACCESS_MASK DesiredAccess,
3875 );
3876 
3877 NTSYSAPI
3878 NTSTATUS
3879 NTAPI
3881  _In_ HANDLE KeyHandle,
3883  _In_ ULONG Index,
3884  _In_ ULONG Unused
3885 );
3886 
3887 NTSYSAPI
3888 NTSTATUS
3889 NTAPI
3891  _In_ HANDLE KeyHandle
3892 );
3893 
3894 NTSYSAPI
3895 NTSTATUS
3896 NTAPI
3898  _Out_ HANDLE KeyHandle,
3899  _In_ ACCESS_MASK DesiredAccess,
3901  _In_ ULONG Unused
3902 );
3903 
3904 NTSYSAPI
3905 NTSTATUS
3906 NTAPI
3908  _In_ HANDLE KeyHandle,
3909  _Out_opt_ PULONG Type,
3912  _In_ ULONG Unused
3913 );
3914 
3915 NTSYSAPI
3916 NTSTATUS
3917 NTAPI
3919  _In_ HANDLE KeyHandle,
3920  _In_ ULONG Type,
3921  _In_ PVOID Data,
3923 );
3924 #endif
3925 
3926 //
3927 // NLS Functions
3928 //
3929 NTSYSAPI
3930 VOID
3931 NTAPI
3935 );
3936 
3937 NTSYSAPI
3938 VOID
3939 NTAPI
3941  _In_ PUSHORT AnsiTableBase,
3942  _In_ PUSHORT OemTableBase,
3943  _In_ PUSHORT CaseTableBase,
3944  _Out_ PNLSTABLEINFO NlsTable
3945 );
3946 
3948 NTSYSAPI
3949 VOID
3950 NTAPI
3952  _In_ PUSHORT TableBase,
3954 );
3955 
3956 NTSYSAPI
3957 VOID
3958 NTAPI
3960  _In_ PNLSTABLEINFO NlsTable);
3961 
3962 #if defined(NTOS_MODE_USER) && !defined(NO_RTL_INLINES)
3963 
3964 //
3965 // Misc conversion functions
3966 //
3967 static __inline
3971  _In_ LONG SignedInteger
3972 )
3973 {
3975 
3976  Result.QuadPart = SignedInteger;
3977  return Result;
3978 }
3979 
3980 static __inline
3984  _In_ LONG Multiplicand,
3985  _In_ LONG Multiplier
3986 )
3987 {
3988  LARGE_INTEGER Product;
3989 
3990  Product.QuadPart = (LONGLONG)Multiplicand * (ULONGLONG)Multiplier;
3991  return Product;
3992 }
3993 
3994 static __inline
3995 ULONG
3998  _In_ ULARGE_INTEGER Dividend,
3999  _In_ ULONG Divisor,
4001 )
4002 {
4003  ULONG Quotient;
4004 
4005  Quotient = (ULONG)(Dividend.QuadPart / Divisor);
4006  if (Remainder) {
4007  *Remainder = (ULONG)(Dividend.QuadPart % Divisor);
4008  }
4009 
4010  return Quotient;
4011 }
4012 
4013 static __inline
4017  _In_ ULONG Multiplicand,
4018  _In_ ULONG Multiplier
4019 )
4020 {
4021  LARGE_INTEGER Product;
4022 
4023  Product.QuadPart = (ULONGLONG)Multiplicand * (ULONGLONG)Multiplier;
4024  return Product;
4025 }
4026 
4027 #if defined(_AMD64_) || defined(_IA64_)
4028 static __inline
4032  _In_ LARGE_INTEGER Dividend,
4033  _In_ ULONG Divisor,
4034  _Out_opt_ PULONG Remainder)
4035 {
4037  ret.QuadPart = (ULONG64)Dividend.QuadPart / Divisor;
4038  if (Remainder)
4039  *Remainder = (ULONG)(Dividend.QuadPart % Divisor);
4040  return ret;
4041 }
4042 
4043 #else
4044 NTSYSAPI
4046 NTAPI
4048  _In_ LARGE_INTEGER Dividend,
4049  _In_ ULONG Divisor,
4050  _Out_opt_ PULONG Remainder
4051 );
4052 
4053 #endif /* defined(_AMD64_) || defined(_IA64_) */
4054 
4055 #endif
4056 
4057 
4058 NTSYSAPI
4059 ULONG
4060 NTAPI
4061 RtlUniform(
4062  _In_ PULONG Seed
4063 );
4064 
4065 NTSYSAPI
4066 ULONG
4067 NTAPI
4068 RtlRandom(
4069  _Inout_ PULONG Seed
4070 );
4071 
4072 NTSYSAPI
4073 ULONG
4074 NTAPI
4076  _In_ ULONG InitialCrc,
4077  _In_ PUCHAR Buffer,
4078  _In_ ULONG Length
4079 );
4080 
4081 //
4082 // Network Functions
4083 //
4084 NTSYSAPI
4085 PSTR
4086 NTAPI
4088  _In_ const struct in_addr *Addr,
4089  _Out_writes_(16) PCHAR S
4090 );
4091 
4092 NTSYSAPI
4093 PWSTR
4094 NTAPI
4096  _In_ const struct in_addr *Addr,
4097  _Out_writes_(16) PWCHAR S
4098 );
4099 
4100 NTSYSAPI
4101 NTSTATUS
4102 NTAPI
4104  _In_ const struct in_addr *Address,
4105  _In_ USHORT Port,
4106  _Out_writes_to_(*AddressStringLength, *AddressStringLength) PCHAR AddressString,
4107  _Inout_ PULONG AddressStringLength
4108 );
4109 
4110 NTSTATUS
4111 NTAPI
4113  _In_ const struct in_addr *Address,
4114  _In_ USHORT Port,
4115  _Out_writes_to_(*AddressStringLength, *AddressStringLength) PWCHAR AddressString,
4116  _Inout_ PULONG AddressStringLength
4117 );
4118 
4119 NTSYSAPI
4120 NTSTATUS
4121 NTAPI
4123  _In_ PCSTR String,
4124  _In_ BOOLEAN Strict,
4125  _Out_ PCSTR *Terminator,
4126  _Out_ struct in_addr *Addr
4127 );
4128 
4129 NTSYSAPI
4130 NTSTATUS
4131 NTAPI
4133  _In_ PCWSTR String,
4134  _In_ BOOLEAN Strict,
4135  _Out_ PCWSTR *Terminator,
4136  _Out_ struct in_addr *Addr
4137 );
4138 
4139 NTSYSAPI
4140 NTSTATUS
4141 NTAPI
4143  _In_ PCSTR AddressString,
4144  _In_ BOOLEAN Strict,
4145  _Out_ struct in_addr *Address,
4146  _Out_ PUSHORT Port
4147 );
4148 
4149 NTSYSAPI
4150 NTSTATUS
4151 NTAPI
4153  _In_ PCWSTR AddressString,
4154  _In_ BOOLEAN Strict,
4155  _Out_ struct in_addr *Address,
4156  _Out_ PUSHORT Port
4157 );
4158 
4159 NTSYSAPI
4160 PSTR
4161 NTAPI
4163  _In_ const struct in6_addr *Addr,
4164  _Out_writes_(46) PSTR S
4165 );
4166 
4167 NTSYSAPI
4168 PWSTR
4169 NTAPI
4171  _In_ const struct in6_addr *Addr,
4172  _Out_writes_(46) PWSTR S
4173 );
4174 
4175 NTSYSAPI
4176 NTSTATUS
4177 NTAPI
4179  _In_ const struct in6_addr *Address,
4180  _In_ ULONG ScopeId,
4181  _In_ USHORT Port,
4182  _Out_writes_to_(*AddressStringLength, *AddressStringLength) PSTR AddressString,
4183  _Inout_ PULONG AddressStringLength
4184 );
4185 
4186 NTSYSAPI
4187 NTSTATUS
4188 NTAPI
4190  _In_ const struct in6_addr *Address,
4191  _In_ ULONG ScopeId,
4192  _In_ USHORT Port,
4193  _Out_writes_to_(*AddressStringLength, *AddressStringLength) PWCHAR AddressString,
4194  _Inout_ PULONG AddressStringLength
4195 );
4196 
4197 NTSYSAPI
4198 NTSTATUS
4199 NTAPI
4201  _In_ PCSTR String,
4202  _Out_ PCSTR *Terminator,
4203  _Out_ struct in6_addr *Addr
4204 );
4205 
4206 NTSYSAPI
4207 NTSTATUS
4208 NTAPI
4210  _In_ PCWSTR String,
4211  _Out_ PCWSTR *Terminator,
4212  _Out_ struct in6_addr *Addr
4213 );
4214 
4215 NTSYSAPI
4216 NTSTATUS
4217 NTAPI
4219  _In_ PCSTR AddressString,
4220  _Out_ struct in6_addr *Address,
4221  _Out_ PULONG ScopeId,
4222  _Out_ PUSHORT Port
4223 );
4224 
4225 NTSYSAPI
4226 NTSTATUS
4227 NTAPI
4229  _In_ PCWSTR AddressString,
4230  _Out_ struct in6_addr *Address,
4231  _Out_ PULONG ScopeId,
4232  _Out_ PUSHORT Port
4233 );
4234 
4235 
4236 //
4237 // Time Functions
4238 //
4239 NTSYSAPI
4240 NTSTATUS
4241 NTAPI
4243  _Out_ PRTL_TIME_ZONE_INFORMATION TimeZoneInformation);
4244 
4245 NTSYSAPI
4246 VOID
4247 NTAPI
4249  _In_ ULONG SecondsSince1970,
4251 );
4252 
4253 NTSYSAPI
4254 NTSTATUS
4255 NTAPI
4257  _In_ PRTL_TIME_ZONE_INFORMATION TimeZoneInformation);
4258 
4259 _Success_(return!=FALSE)
4261 NTSYSAPI
4262 BOOLEAN
4263 NTAPI
4267 );
4268 
4269 _Success_(return != 0)
4271 NTSYSAPI
4272 BOOLEAN
4273 NTAPI
4277 );
4278 
4279 NTSYSAPI
4280 VOID
4281 NTAPI
4283  PLARGE_INTEGER Time,
4284  PTIME_FIELDS TimeFields
4285 );
4286 
4287 NTSYSAPI
4288 NTSTATUS
4289 NTAPI
4291  _In_ PLARGE_INTEGER SystemTime,
4292  _Out_ PLARGE_INTEGER LocalTime
4293 );
4294 
4295 //
4296 // Version Functions
4297 //
4300 NTSYSAPI
4301 NTSTATUS
4302 NTAPI
4304  _In_ PRTL_OSVERSIONINFOEXW VersionInfo,
4307 );
4308 
4310 NTSYSAPI
4311 NTSTATUS
4312 NTAPI
4314  _Out_
4315  _At_(lpVersionInformation->dwOSVersionInfoSize, _Pre_ _Valid_)
4316  _When_(lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW),
4317  _At_((PRTL_OSVERSIONINFOEXW)lpVersionInformation, _Out_))
4318  PRTL_OSVERSIONINFOW lpVersionInformation
4319 );
4320 
4321 NTSYSAPI
4322 BOOLEAN
4323 NTAPI
4325 
4326 //
4327 // Secure Memory Functions
4328 //
4329 #ifdef NTOS_MODE_USER
4330 NTSYSAPI
4331 NTSTATUS
4332 NTAPI
4334  _In_ PRTL_SECURE_MEMORY_CACHE_CALLBACK Callback);
4335 
4336 NTSYSAPI
4337 BOOLEAN
4338 NTAPI
4340  _In_ PVOID MemoryCache,
4341  _In_opt_ SIZE_T MemoryLength
4342 );
4343 #endif
4344 
4345 //
4346 // Boot Status Data Functions
4347 //
4348 #ifdef NTOS_MODE_USER
4349 NTSYSAPI
4350 NTSTATUS
4351 NTAPI
4353  VOID
4354 );
4355 
4356 NTSYSAPI
4357 NTSTATUS
4358 NTAPI
4361  _In_ BOOLEAN WriteMode,
4362  _In_ RTL_BSD_ITEM_TYPE DataClass,
4363  _In_ PVOID Buffer,
4364  _In_ ULONG BufferSize,
4365  _Out_opt_ PULONG ReturnLength
4366 );
4367 
4368 NTSYSAPI
4369 NTSTATUS
4370 NTAPI
4373 );
4374 
4375 NTSYSAPI
4376 NTSTATUS
4377 NTAPI
4380 );
4381 #endif
4382 
4383 #ifdef NTOS_MODE_USER
4385 NTSYSAPI
4386 NTSTATUS
4387 NTAPI
4389  _In_ PUNICODE_STRING GuidString,
4390  _Out_ GUID *Guid);
4391 
4393 NTSYSAPI
4394 NTSTATUS
4395 NTAPI
4397  _In_ REFGUID Guid,
4398  _Out_ _At_(GuidString->Buffer, __drv_allocatesMem(Mem))
4399  PUNICODE_STRING GuidString);
4400 
4401 NTSYSAPI
4402 NTSTATUS
4403 NTAPI
4405  _In_ HANDLE hFile,
4406  _Out_ PCHAR Hash,
4407  _In_ ULONG ImportTableHashRevision
4408 );
4409 #endif
4410 
4411 //
4412 // MemoryStream functions
4413 //
4414 #ifdef NTOS_MODE_USER
4415 
4416 NTSYSAPI
4417 VOID
4418 NTAPI
4420  _Out_ PRTL_MEMORY_STREAM Stream
4421 );
4422 
4423 NTSYSAPI
4424 VOID
4425 NTAPI
4427  _Out_ PRTL_MEMORY_STREAM Stream
4428 );
4429 
4430 NTSYSAPI
4431 VOID
4432 NTAPI
4434  _In_ PRTL_MEMORY_STREAM Stream
4435 );
4436 
4437 NTSYSAPI
4438 HRESULT
4439 NTAPI
4441  _In_ struct IStream *This,
4442  _In_ REFIID RequestedIid,
4443  _Outptr_ PVOID *ResultObject
4444 );
4445 
4446 NTSYSAPI
4447 ULONG
4448 NTAPI
4450  _In_ struct IStream *This
4451 );
4452 
4453 NTSYSAPI
4454 ULONG
4455 NTAPI
4457  _In_ struct IStream *This
4458 );
4459 
4460 NTSYSAPI
4461 HRESULT
4462 NTAPI
4464  _In_ struct IStream *This,
4465  _Out_writes_bytes_(Length) PVOID Buffer,
4466  _In_ ULONG Length,
4468 );
4469 
4470 NTSYSAPI
4471 HRESULT
4472 NTAPI
4474  _In_ struct IStream *This,
4475  _Out_writes_bytes_(Length) PVOID Buffer,
4476  _In_ ULONG Length,
4478 );
4479 
4480 NTSYSAPI
4481 HRESULT
4482 NTAPI
4484  _In_ struct IStream *This,
4485  _In_ LARGE_INTEGER RelativeOffset,
4486  _In_ ULONG Origin,
4487  _Out_opt_ PULARGE_INTEGER ResultOffset
4488 );
4489 
4490 NTSYSAPI
4491 HRESULT
4492 NTAPI
4494  _In_ struct IStream *This,
4495  _In_ struct IStream *Target,
4496  _In_ ULARGE_INTEGER Length,
4499 );
4500 
4501 NTSYSAPI
4502 HRESULT
4503 NTAPI
4504 RtlCopyOutOfProcessMemoryStreamTo(
4505  _In_ struct IStream *This,
4506  _In_ struct IStream *Target,
4507  _In_ ULARGE_INTEGER Length,
4510 );
4511 
4512 NTSYSAPI
4513 HRESULT
4514 NTAPI
4516  _In_ struct IStream *This,
4517  _Out_ struct tagSTATSTG *Stats,
4518  _In_ ULONG Flags
4519 );
4520 
4521 // Dummy functions
4522 NTSYSAPI
4523 HRESULT
4524 NTAPI
4526  _In_ struct IStream *This,
4527  _In_reads_bytes_(Length) CONST VOID *Buffer,
4528  _In_ ULONG Length,
4530 );
4531 
4532 NTSYSAPI
4533 HRESULT
4534 NTAPI
4536  _In_ struct IStream *This,
4538 );
4539 
4540 NTSYSAPI
4541 HRESULT
4542 NTAPI
4544  _In_ struct IStream *This,
4545  _In_ ULONG CommitFlags
4546 );
4547 
4548 NTSYSAPI
4549 HRESULT
4550 NTAPI
4552  _In_ struct IStream *This
4553 );
4554 
4555 NTSYSAPI
4556 HRESULT
4557 NTAPI
4559  _In_ struct IStream *This,
4561  _In_ ULARGE_INTEGER Length,
4562  _In_ ULONG LockType
4563 );
4564 
4565 NTSYSAPI
4566 HRESULT
4567 NTAPI
4569  _In_ struct IStream *This,
4571  _In_ ULARGE_INTEGER Length,
4572  _In_ ULONG LockType
4573 );
4574 
4575 NTSYSAPI
4576 HRESULT
4577 NTAPI
4579  _In_ struct IStream *This,
4580  _Outptr_ struct IStream **ResultStream
4581 );
4582 
4583 #endif // NTOS_MODE_USER
4584 
4585 NTSYSAPI
4586 NTSTATUS
4587 NTAPI
4589  ULONG flags,
4590  const GUID *extguid,
4591  ULONG section_kind,
4592  const GUID *guid,
4593  void *ptr
4594 );
4595 
4596 #ifdef __cplusplus
4597 }
4598 #endif
4599 
4600 #endif
NTSYSAPI VOID NTAPI RtlConvertExclusiveToShared(_In_ PRTL_RESOURCE Resource)
DWORD *typedef PVOID
Definition: winlogon.h:52
NTSYSAPI NTSTATUS NTAPI RtlCreateTimer(_In_ HANDLE TimerQueue, _In_ PHANDLE phNewTimer, _In_ WAITORTIMERCALLBACKFUNC Callback, _In_ PVOID Parameter, _In_ ULONG DueTime, _In_ ULONG Period, _In_ ULONG Flags)
_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:3812
LONG(NTAPI * PVECTORED_EXCEPTION_HANDLER)(PEXCEPTION_POINTERS ExceptionPointers)
Definition: rtltypes.h:481
_When_(Status< 0, _Out_range_(>, 0)) _When_(Status >=0
NTSYSAPI NTSTATUS NTAPI RtlDeregisterWaitEx(_In_ HANDLE hWaitHandle, _In_opt_ HANDLE hCompletionEvent)
__analysis_noreturn NTSYSAPI VOID NTAPI RtlAssert(_In_ PVOID FailedAssertion, _In_ PVOID FileName, _In_ ULONG LineNumber, _In_opt_z_ PSTR Message)
PVOID NTAPI RtlEncodeSystemPointer(IN PVOID Pointer)
Definition: process.c:429
NTSYSAPI ULONG NTAPI RtlRandom(_Inout_ PULONG Seed)
CONST WCHAR * PCWCH
Definition: ntbasedef.h:410
CONST char * PCSZ
Definition: umtypes.h:120
NTSYSAPI ULONG NTAPI RtlFindClearBitsAndSet(_In_ PRTL_BITMAP BitMapHeader, _In_ ULONG NumberToFind, _In_ ULONG HintIndex)
Definition: bitmap.c:645
NTSYSAPI PVOID NTAPI RtlLookupElementGenericTableFull(_In_ PRTL_GENERIC_TABLE Table, _In_ PVOID Buffer, _Out_ PVOID *NodeOrParent, _Out_ TABLE_SEARCH_RESULT *SearchResult)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosErrorNoTeb(NTSTATUS)
static int Hash(const char *)
Definition: reader.c:2247
NTSYSAPI VOID NTAPI RtlUpperString(PSTRING DestinationString, PSTRING SourceString)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
_Must_inspect_result_ NTSYSAPI PVOID NTAPI RtlEnumerateGenericTableWithoutSplaying(_In_ PRTL_GENERIC_TABLE Table, _Inout_ PVOID *RestartKey)
NTSYSAPI NTSTATUS NTAPI RtlLookupAtomInAtomTable(_In_ PRTL_ATOM_TABLE AtomTable, _In_ PWSTR AtomName, _Out_ PRTL_ATOM Atom)
NTSYSAPI NTSTATUS NTAPI RtlNewSecurityObject(_In_ PSECURITY_DESCRIPTOR ParentDescriptor, _In_ PSECURITY_DESCRIPTOR CreatorDescriptor, _Out_ PSECURITY_DESCRIPTOR *NewDescriptor, _In_ BOOLEAN IsDirectoryObject, _In_ HANDLE Token, _In_ PGENERIC_MAPPING GenericMapping)
RTL_GENERIC_COMPARE_ROUTINE * PRTL_GENERIC_COMPARE_ROUTINE
Definition: rtltypes.h:448
*BytesInOemString PCHAR OemString
Definition: rtlfuncs.h:1561
enum _RTL_PATH_TYPE RTL_PATH_TYPE
NTSYSAPI BOOLEAN NTAPI RtlValidSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor)
Definition: sd.c:1055
_In_ ULONG TypeMask
Definition: rtlfuncs.h:4305
NTSYSAPI ULONG NTAPI RtlNumberOfSetBits(_In_ PRTL_BITMAP BitMapHeader)
Definition: bitmap.c:474
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
Definition: dumpinfo.c:39
CPPORT Port[4]
Definition: headless.c:34
_Must_inspect_result_ typedef _In_ PVOID Unused
Definition: iotypes.h:1128
#define _Pre_unknown_
Definition: no_sal2.h:535
const uint16_t * PCWSTR
Definition: typedefs.h:56
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
Definition: rtlfuncs.h:3845
#define IN
Definition: typedefs.h:39
DECLSPEC_NORETURN NTSYSAPI VOID NTAPI RtlRaiseStatus(_In_ NTSTATUS Status)
#define RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT
Definition: rtlfuncs.h:786
NTSYSAPI NTSTATUS NTAPI RtlSetSaclSecurityDescriptor(_Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ BOOLEAN SaclPresent, _In_ PACL Sacl, _In_ BOOLEAN SaclDefaulted)
NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressA(_In_ PCSTR String, _In_ BOOLEAN Strict, _Out_ PCSTR *Terminator, _Out_ struct in_addr *Addr)
Definition: network.c:338
NTSYSAPI VOID NTAPI RtlResetRtlTranslations(_In_ PNLSTABLEINFO NlsTable)
NTSYSAPI VOID NTAPI RtlSetSecurityDescriptorRMControl(_Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PUCHAR RMControl)
RTL_AVL_COMPARE_ROUTINE * PRTL_AVL_COMPARE_ROUTINE
Definition: rtltypes.h:381
static CODEPAGE_ENTRY AnsiCodePage
Definition: nls.c:41
NTSYSAPI NTSTATUS NTAPI RtlCreateProcessParameters(_Out_ PRTL_USER_PROCESS_PARAMETERS *ProcessParameters, _In_ PUNICODE_STRING ImagePathName, _In_opt_ PUNICODE_STRING DllPath, _In_opt_ PUNICODE_STRING CurrentDirectory, _In_opt_ PUNICODE_STRING CommandLine, _In_opt_ PWSTR Environment, _In_opt_ PUNICODE_STRING WindowTitle, _In_opt_ PUNICODE_STRING DesktopInfo, _In_opt_ PUNICODE_STRING ShellInfo, _In_opt_ PUNICODE_STRING RuntimeInfo)
#define _In_opt_z_
Definition: no_sal2.h:221
HRESULT NTAPI RtlUnlockMemoryStreamRegion(_In_ IStream *This, _In_ ULARGE_INTEGER Offset, _In_ ULARGE_INTEGER Length, _In_ ULONG LockType)
Definition: memstream.c:440
#define _Must_inspect_result_
Definition: no_sal2.h:314
_Out_ PLARGE_INTEGER Time
Definition: rtlfuncs.h:4267
_In_opt_ PSID _In_opt_ BOOLEAN OwnerDefaulted
Definition: rtlfuncs.h:1606
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ FLT_IO_OPERATION_FLAGS _Out_opt_ PULONG BytesWritten
Definition: fltkernel.h:1293
Definition: rtltypes.h:1731
_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)
#define REFIID
Definition: guiddef.h:113
NTSYSAPI VOID NTAPI RtlDeleteResource(_In_ PRTL_RESOURCE Resource)
_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
PVOID ULONG Address
Definition: oprghdlr.h:14
NTSYSAPI VOID NTAPI RtlDeleteNoSplay(_In_ PRTL_SPLAY_LINKS Links, _Inout_ PRTL_SPLAY_LINKS *Root)
VOID(* PIO_APC_ROUTINE)(IN PVOID ApcContext, IN PIO_STATUS_BLOCK IoStatusBlock, IN ULONG Reserved)
Definition: nt_native.h:877
#define _Notnull_
Definition: no_sal2.h:316
unsigned short RTL_ATOM
Definition: atom.c:42
#define _Post_invalid_
Definition: no_sal2.h:457
static ACCESS_MASK const OBJECT_ATTRIBUTES ULONG TitleIndex
Definition: reg.c:130
NTSYSAPI ULONG NTAPI RtlWalkFrameChain(_Out_writes_(Count-(Flags >> RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT)) PVOID *Callers, _In_ ULONG Count, _In_ ULONG Flags)
_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 NTSTATUS NTAPI RtlGetControlSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PSECURITY_DESCRIPTOR_CONTROL Control, _Out_ PULONG Revision)
void Fill(HDC hdc, LONG x, LONG y, COLORREF color)
Definition: drawing.cpp:109
NTSYSAPI VOID NTAPI RtlConvertSharedToExclusive(_In_ PRTL_RESOURCE Resource)
WORD * PSECURITY_DESCRIPTOR_CONTROL
Definition: lsa.idl:37
NTSYSAPI NTSTATUS NTAPI RtlSetGroupSecurityDescriptor(IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSID Group, IN BOOLEAN GroupDefaulted)
Definition: sd.c:410
NTSYSAPI VOID NTAPI RtlSetBit(_In_ PRTL_BITMAP BitMapHeader, _In_range_(<, BitMapHeader->SizeOfBitMap) ULONG BitNumber)
Definition: bitmap.c:304
NTSTATUS NTAPI RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
Definition: version.c:158
_In_ ULONG_PTR _In_count_(cFiles) PVOID *ppvView
Definition: winddi.h:3721
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
enum _ACL_INFORMATION_CLASS ACL_INFORMATION_CLASS
NTSTATUS NTAPI RtlSetThreadPoolStartFunc(_In_ PRTL_START_POOL_THREAD StartPoolThread, _In_ PRTL_EXIT_POOL_THREAD ExitPoolThread)
VOID NTAPI RtlInitOutOfProcessMemoryStream(_Out_ PRTL_MEMORY_STREAM Stream)
Definition: memstream.c:84
_Inout_opt_ POEM_STRING _Out_opt_ PBOOLEAN NameContainsSpaces
Definition: rtlfuncs.h:2867
_Success_(return!=FALSE) NTSYSAPI BOOLEAN NTAPI RtlIsValidIndexHandle(_In_ PRTL_HANDLE_TABLE HandleTable
Definition: mapping.c:279
NTSYSAPI PWSTR NTAPI RtlIpv4AddressToStringW(_In_ const struct in_addr *Addr, _Out_writes_(16) PWCHAR S)
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ PNDIS_STRING SubKeyName
Definition: ndis.h:4704
NTSYSAPI PVOID WINAPI RtlAddVectoredExceptionHandler(ULONG, PVECTORED_EXCEPTION_HANDLER)
_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:1571
struct _Entry Entry
Definition: kefuncs.h:640
Definition: scsiwmi.h:51
#define __cdecl
Definition: accygwin.h:78
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
NTSYSAPI void WINAPI RtlAddRefActivationContext(HANDLE)
Definition: actctx.c:4878
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4692
NTSYSAPI PSTR NTAPI RtlIpv4AddressToStringA(_In_ const struct in_addr *Addr, _Out_writes_(16) PCHAR S)
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY ListEnd
Definition: exfuncs.h:1015
Definition: ntbasedef.h:627
static __inline ULONG NTAPI_INLINE RtlEnlargedUnsignedDivide(_In_ ULARGE_INTEGER Dividend, _In_ ULONG Divisor, _Out_opt_ PULONG Remainder)
Definition: rtlfuncs.h:2891
ULONG(NTAPI * PTHREAD_START_ROUTINE)(PVOID Parameter)
Definition: rtltypes.h:542
NTSYSAPI VOID NTAPI RtlDestroyHandleTable(_Inout_ PRTL_HANDLE_TABLE HandleTable)
NTSTATUS NTAPI RtlUsageHeap(IN HANDLE Heap, IN ULONG Flags, OUT PRTL_HEAP_USAGE Usage)
Definition: heap.c:3831
NTSYSAPI NTSTATUS WINAPI RtlCheckRegistryKey(ULONG, PWSTR)
#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 VOID NTAPI RtlExitUserThread(_In_ NTSTATUS Status)
WCHAR CurrentDirectory[1024]
Definition: chkdsk.c:71
NTSYSAPI NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR, DWORD, LPDWORD, LPCSTR, DWORD)
* PSID_IDENTIFIER_AUTHORITY
Definition: setypes.h:411
NTSYSAPI ULONG NTAPI DbgPrompt(_In_z_ PCCH Prompt, _Out_writes_bytes_(MaximumResponseLength) PCH Response, _In_ ULONG MaximumResponseLength)
NTSYSAPI void WINAPI RtlReleaseActivationContext(HANDLE)
Definition: actctx.c:4889
BOOLEAN NTAPI RtlTimeToSecondsSince1970(PLARGE_INTEGER Time, PULONG ElapsedSeconds)
NTSYSAPI PSTR NTAPI RtlIpv6AddressToStringA(_In_ const struct in6_addr *Addr, _Out_writes_(46) PSTR S)
NTSYSAPI VOID NTAPI RtlSetAllBits(_In_ PRTL_BITMAP BitMapHeader)
Definition: bitmap.c:283
NTSYSAPI VOID NTAPI RtlInitializeHandleTable(_In_ ULONG TableSize, _In_ ULONG HandleSize, _In_ PRTL_HANDLE_TABLE HandleTable)
_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
__wchar_t WCHAR
Definition: xmlstorage.h:180
_In_opt_ PVOID _In_opt_ SIZE_T _In_opt_ SIZE_T _In_opt_ PVOID Lock
Definition: rtlfuncs.h:2169
_In_ LARGE_INTEGER DueTime
Definition: kefuncs.h:524
_Must_inspect_result_ NTSYSAPI PRTL_SPLAY_LINKS NTAPI RtlSubtreeSuccessor(_In_ PRTL_SPLAY_LINKS Links)
NTSYSAPI ULONG NTAPI RtlFindClearBits(_In_ PRTL_BITMAP BitMapHeader, _In_ ULONG NumberToFind, _In_ ULONG HintIndex)
Definition: bitmap.c:509
HRESULT NTAPI RtlCopyMemoryStreamTo(_In_ IStream *This, _In_ IStream *Target, _In_ ULARGE_INTEGER Length, _Out_opt_ PULARGE_INTEGER BytesRead, _Out_opt_ PULARGE_INTEGER BytesWritten)
Definition: memstream.c:277
NTSYSAPI VOID NTAPI RtlDestroyEnvironment(_In_ PWSTR Environment)
NTSYSAPI VOID NTAPI RtlSecondsSince1970ToTime(_In_ ULONG SecondsSince1970, _Out_ PLARGE_INTEGER Time)
struct _LIST_ENTRY * Blink
Definition: typedefs.h:121
FORCEINLINE VOID InsertHeadList(_Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY Entry)
Definition: rtlfuncs.h:201
NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING, PCSZ)
#define _Ret_opt_z_
Definition: no_sal2.h:608
NTSYSAPI BOOLEAN NTAPI RtlAcquireResourceShared(_In_ PRTL_RESOURCE Resource, _In_ BOOLEAN Wait)
NTSYSAPI BOOLEAN NTAPI RtlDeleteElementGenericTableAvl(_In_ PRTL_AVL_TABLE Table, _In_ PVOID Buffer)
const char * PCSTR
Definition: typedefs.h:52
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:382
_In_ BOOLEAN _In_ ULONG HashAlgorithm
Definition: rtlfuncs.h:2039
NTSYSAPI PVOID NTAPI RtlFreeSid(_In_ _Post_invalid_ PSID Sid)
IN OUT PIRP IN ULONG IN WMIENABLEDISABLECONTROL Function
Definition: wmilib.h:37
_In_opt_ PSECURITY_DESCRIPTOR _Out_ PSECURITY_DESCRIPTOR _In_ BOOLEAN IsDirectoryObject
Definition: sefuncs.h:29
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE _In_opt_ PVOID _In_opt_ PVOID Environment
Definition: rtlfuncs.h:3845
_In_opt_ PSID Group
Definition: rtlfuncs.h:1582
NTSTATUS NTAPI RtlRegisterSecureMemoryCacheCallback(IN PRTL_SECURE_MEMORY_CACHE_CALLBACK Callback)
Definition: security.c:819
unsigned char * PUCHAR
Definition: retypes.h:3
NTSYSAPI NTSTATUS WINAPI RtlSetHeapInformation(HANDLE, HEAP_INFORMATION_CLASS, PVOID, SIZE_T)
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:3857
NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressExW(_In_ PCWSTR AddressString, _In_ BOOLEAN Strict, _Out_ struct in_addr *Address, _Out_ PUSHORT Port)
Definition: network.c:450
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
NTSYSAPI NTSTATUS NTAPI RtlAddAtomToAtomTable(_In_ PRTL_ATOM_TABLE AtomTable, _In_ PWSTR AtomName, _Out_ PRTL_ATOM Atom)
NTSYSAPI NTSTATUS NTAPI RtlIntegerToUnicode(_In_ ULONG Value, _In_opt_ ULONG Base, _In_opt_ ULONG Length, _Inout_ LPWSTR String)
enum _TABLE_SEARCH_RESULT TABLE_SEARCH_RESULT
VOID NTAPI RtlReleaseRelativeName(_In_ PRTL_RELATIVE_NAME_U RelativeName)
NTSYSAPI NTSTATUS NTAPI RtlCopySidAndAttributesArray(_In_ ULONG Count, _In_ PSID_AND_ATTRIBUTES Src, _In_ ULONG SidAreaSize, _In_ PSID_AND_ATTRIBUTES Dest, _In_ PSID SidArea, _Out_ PSID *RemainingSidArea, _Out_ PULONG RemainingSidAreaSize)
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)
_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:603
NTSYSAPI NTSTATUS NTAPI RtlDeregisterWait(_In_ HANDLE hWaitHandle)
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID _Out_ PHANDLE Token
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2303
NTSYSAPI NTSTATUS NTAPI RtlQueueWorkItem(_In_ WORKERCALLBACKFUNC Function, _In_opt_ PVOID Context, _In_ ULONG Flags)
VOID NTAPI RtlFreeOemString(POEM_STRING OemString)
NTSYSAPI BOOLEAN WINAPI RtlLockHeap(HANDLE)
NTSYSAPI VOID NTAPI RtlEraseUnicodeString(_Inout_ PUNICODE_STRING String)
#define _Post_bytecap_(size)
Definition: no_sal2.h:447
#define _Outptr_
Definition: no_sal2.h:396
PVOID *typedef PWSTR
Definition: winlogon.h:57
NTSYSAPI NTSTATUS NTAPI RtlDestroyProcessParameters(_In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters)
_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)
NTSYSAPI ULONG __cdecl DbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ _Printf_format_string_ PCSTR Format,...)
PWSTR NTAPI RtlQueryTagHeap(IN PVOID HeapHandle, IN ULONG Flags, IN USHORT TagIndex, IN BOOLEAN ResetCounters, OUT PRTL_HEAP_TAG_INFO HeapTagInfo)
Definition: heap.c:3842
NTSYSAPI VOID NTAPI RtlUnwind(_In_opt_ PVOID TargetFrame, _In_opt_ PVOID TargetIp, _In_opt_ PEXCEPTION_RECORD ExceptionRecord, _In_ PVOID ReturnValue)
Definition: except.c:47
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
#define _Const_
Definition: no_sal2.h:18
static EMS_HANDLE HandleTable[EMS_MAX_HANDLES]
Definition: emsdrv.c:40
NTSYSAPI NTSTATUS NTAPI RtlFindMessage(_In_ PVOID BaseAddress, _In_ ULONG Type, _In_ ULONG Language, _In_ ULONG MessageId, _Out_ PMESSAGE_RESOURCE_ENTRY *MessageResourceEntry)
_In_ LARGE_INTEGER _In_ ULONG Period
Definition: kefuncs.h:1268
NTSYSAPI PVOID NTAPI RtlInsertElementGenericTableFullAvl(_In_ PRTL_AVL_TABLE Table, _In_reads_bytes_(BufferSize) PVOID Buffer, _In_ CLONG BufferSize, _Out_opt_ PBOOLEAN NewElement, _In_ PVOID NodeOrParent, _In_ TABLE_SEARCH_RESULT SearchResult)
NTSYSAPI NTSTATUS NTAPI RtlWow64EnableFsRedirection(IN BOOLEAN Wow64FsEnableRedirection)
Definition: libsupp.c:574
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
NTSYSAPI PULONG NTAPI RtlSubAuthoritySid(_In_ PSID Sid, _In_ ULONG SubAuthority)
NTSYSAPI NTSTATUS NTAPI RtlAdjustPrivilege(_In_ ULONG Privilege, _In_ BOOLEAN NewValue, _In_ BOOLEAN ForThread, _Out_ PBOOLEAN OldValue)
NTSYSAPI PVOID WINAPI RtlDecodePointer(PVOID)
NTSYSAPI NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR, DWORD, LPDWORD, LPCSTR, DWORD)
NTSYSAPI VOID NTAPI RtlAcquirePebLock(VOID)
Definition: libsupp.c:88
NTSYSAPI NTSTATUS NTAPI RtlPinAtomInAtomTable(_In_ PRTL_ATOM_TABLE AtomTable, _In_ RTL_ATOM Atom)
_In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ PEPROCESS ProcessId
Definition: iotypes.h:1451
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
_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:1070
NTSTATUS NTAPI RtlGetFullPathName_UstrEx(_In_ PUNICODE_STRING FileName, _In_opt_ PUNICODE_STRING StaticString, _In_opt_ PUNICODE_STRING DynamicString, _Out_opt_ PUNICODE_STRING *StringUsed, _Out_opt_ PSIZE_T FilePartSize, _Out_opt_ PBOOLEAN NameInvalid, _Out_ RTL_PATH_TYPE *PathType, _Out_opt_ PSIZE_T LengthNeeded)
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
_Out_writes_bytes_to_(UncompressedBufferSize,*FinalUncompressedSize) PUCHAR UncompressedBuffer
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
_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
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PCUNICODE_STRING String1, PCUNICODE_STRING String2, BOOLEAN CaseInsensitive)
uint16_t * PWCHAR
Definition: typedefs.h:55
Definition: movable.cpp:7
Definition: shell.h:41
NTSYSAPI ULONG NTAPI RtlFindNextForwardRunSet(_In_ PRTL_BITMAP BitMapHeader, _In_ ULONG FromIndex, _Out_ PULONG StartingRunIndex)
NTSYSAPI NTSTATUS NTAPI RtlCreateAtomTable(_In_ ULONG TableSize, _Inout_ PRTL_ATOM_TABLE *AtomTable)
IN POBJECT_ATTRIBUTES PortAttributes IN ACCESS_MASK DesiredAccess
Definition: creport.c:28
__drv_allocatesMem(Mem)) PRTL_DYNAMIC_HASH_TABLE *HashTable
Definition: exfuncs.h:1197
_In_ PVOID Parameter
Definition: ldrtypes.h:239
NTSYSAPI VOID NTAPI RtlInitializeContext(_In_ HANDLE ProcessHandle, _Out_ PCONTEXT ThreadContext, _In_opt_ PVOID ThreadStartParam, _In_ PTHREAD_START_ROUTINE ThreadStartAddress, _In_ PINITIAL_TEB InitialTeb)
NTSYSAPI NTSTATUS NTAPI RtlIntegerToChar(_In_ ULONG Value, _In_ ULONG Base, _In_ ULONG Length, _Out_ PCHAR String)
NTSYSAPI VOID NTAPI RtlRaiseException(_In_ PEXCEPTION_RECORD ExceptionRecord)
_Out_ RTL_ATOM * Atom
Definition: class.h:54
NTSYSAPI VOID NTAPI RtlCopyString(_Out_ PSTRING DestinationString, _In_opt_ const STRING *SourceString)
NTSYSAPI NTSTATUS NTAPI RtlSetSecurityObject(_In_ SECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR ModificationDescriptor, _Out_ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, _In_ PGENERIC_MAPPING GenericMapping, _In_ HANDLE Token)
_In_ const GUID _In_ ULONG PinCount
Definition: strmini.h:504
NTSYSAPI BOOLEAN NTAPI RtlEqualString(PSTRING String1, PSTRING String2, BOOLEAN CaseInSensitive)
NTSYSAPI PRTL_DEBUG_INFORMATION NTAPI RtlCreateQueryDebugBuffer(_In_ ULONG Size, _In_ BOOLEAN EventPair)
NTSYSAPI VOID NTAPI RtlCaptureContext(_Out_ PCONTEXT ContextRecord)
NTSYSAPI void WINAPI RtlCopyLuid(PLUID, const LUID *)
NTSYSAPI WCHAR NTAPI RtlUpcaseUnicodeChar(WCHAR Source)
NTSYSAPI PVOID WINAPI RtlReAllocateHeap(HANDLE, ULONG, PVOID, SIZE_T)
Definition: heap.c:2552
_In_opt_ PSECURITY_DESCRIPTOR _Out_ PSECURITY_DESCRIPTOR * NewDescriptor
Definition: sefuncs.h:29
#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:1650
_In_ ULONG Revision
Definition: rtlfuncs.h:1080
NTSYSAPI VOID NTAPI RtlReleaseResource(_In_ PRTL_RESOURCE Resource)
int32_t INT
Definition: typedefs.h:57
_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:168
unsigned const void const unsigned long cbBuffer
Definition: t2embapi.h:116
DWORD DWORD
Definition: winlogon.h:75
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
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:50
NTSYSAPI ULONG NTAPI RtlFindSetBits(_In_ PRTL_BITMAP BitMapHeader, _In_ ULONG NumberToFind, _In_ ULONG HintIndex)
Definition: bitmap.c:577
NTSYSAPI NTSTATUS NTAPI RtlDeleteSecurityObject(_In_ PSECURITY_DESCRIPTOR *ObjectDescriptor)
_In_ BOOLEAN DaclPresent
Definition: rtlfuncs.h:1571
#define _In_opt_
Definition: no_sal2.h:213
NTSYSAPI VOID NTAPI RtlDumpResource(_In_ PRTL_RESOURCE Resource)
VOID(NTAPI * WAITORTIMERCALLBACKFUNC)(PVOID pvContext, BOOLEAN fTimerOrWaitFired)
Definition: rtltypes.h:472
HANDLE hObject
Definition: wglext.h:924
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 NTSTATUS WINAPI RtlQueryHeapInformation(HANDLE, HEAP_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T)
NTSYSAPI NTSTATUS NTAPI RtlDeleteTimerQueue(HANDLE TimerQueue)
Definition: timerqueue.c:565
_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:1535