731d2386b46b0f6ebe4a4d1ed6dd8fd87a67430a
[reactos.git] / reactos / include / ndk / rtlfuncs.h
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 //
42 FORCEINLINE
43 VOID
44 InitializeListHead(
45 IN PLIST_ENTRY ListHead
46 )
47 {
48 ListHead->Flink = ListHead->Blink = ListHead;
49 }
50
51 FORCEINLINE
52 VOID
53 InsertHeadList(
54 IN PLIST_ENTRY ListHead,
55 IN PLIST_ENTRY Entry
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
66 FORCEINLINE
67 VOID
68 InsertTailList(
69 IN PLIST_ENTRY ListHead,
70 IN PLIST_ENTRY Entry
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
81 FORCEINLINE
82 BOOLEAN
83 IsListEmpty(
84 IN const LIST_ENTRY * ListHead
85 )
86 {
87 return (BOOLEAN)(ListHead->Flink == ListHead);
88 }
89
90 FORCEINLINE
91 PSINGLE_LIST_ENTRY
92 PopEntryList(
93 PSINGLE_LIST_ENTRY ListHead
94 )
95 {
96 PSINGLE_LIST_ENTRY FirstEntry;
97 FirstEntry = ListHead->Next;
98 if (FirstEntry != NULL) {
99 ListHead->Next = FirstEntry->Next;
100 }
101
102 return FirstEntry;
103 }
104
105 FORCEINLINE
106 VOID
107 PushEntryList(
108 PSINGLE_LIST_ENTRY ListHead,
109 PSINGLE_LIST_ENTRY Entry
110 )
111 {
112 Entry->Next = ListHead->Next;
113 ListHead->Next = Entry;
114 }
115
116 FORCEINLINE
117 BOOLEAN
118 RemoveEntryList(
119 IN PLIST_ENTRY Entry)
120 {
121 PLIST_ENTRY OldFlink;
122 PLIST_ENTRY OldBlink;
123
124 OldFlink = Entry->Flink;
125 OldBlink = Entry->Blink;
126 OldFlink->Blink = OldBlink;
127 OldBlink->Flink = OldFlink;
128 return (BOOLEAN)(OldFlink == OldBlink);
129 }
130
131 FORCEINLINE
132 PLIST_ENTRY
133 RemoveHeadList(
134 IN PLIST_ENTRY ListHead)
135 {
136 PLIST_ENTRY Flink;
137 PLIST_ENTRY Entry;
138
139 Entry = ListHead->Flink;
140 Flink = Entry->Flink;
141 ListHead->Flink = Flink;
142 Flink->Blink = ListHead;
143 return Entry;
144 }
145
146 FORCEINLINE
147 PLIST_ENTRY
148 RemoveTailList(
149 IN PLIST_ENTRY ListHead)
150 {
151 PLIST_ENTRY Blink;
152 PLIST_ENTRY Entry;
153
154 Entry = ListHead->Blink;
155 Blink = Entry->Blink;
156 ListHead->Blink = Blink;
157 Blink->Flink = ListHead;
158 return Entry;
159 }
160
161 //
162 // Unicode string macros
163 //
164 FORCEINLINE
165 VOID
166 RtlInitEmptyUnicodeString(OUT PUNICODE_STRING UnicodeString,
167 IN PWSTR Buffer,
168 IN USHORT BufferSize)
169 {
170 UnicodeString->Length = 0;
171 UnicodeString->MaximumLength = BufferSize;
172 UnicodeString->Buffer = Buffer;
173 }
174
175 //
176 // LUID Macros
177 //
178 #define RtlEqualLuid(L1, L2) (((L1)->HighPart == (L2)->HighPart) && \
179 ((L1)->LowPart == (L2)->LowPart))
180 FORCEINLINE
181 LUID
182 NTAPI_INLINE
183 RtlConvertUlongToLuid(ULONG Ulong)
184 {
185 LUID TempLuid;
186
187 TempLuid.LowPart = Ulong;
188 TempLuid.HighPart = 0;
189 return TempLuid;
190 }
191
192 //
193 // ASSERT Macros
194 //
195 #ifndef ASSERT
196 #if DBG
197
198 #define ASSERT( exp ) \
199 ((void)((!(exp)) ? \
200 (RtlAssert( #exp, __FILE__, __LINE__, NULL ),FALSE) : \
201 TRUE))
202
203 #define ASSERTMSG( msg, exp ) \
204 ((void)((!(exp)) ? \
205 (RtlAssert( #exp, __FILE__, __LINE__, msg ),FALSE) : \
206 TRUE))
207
208 #else
209
210 #define ASSERT( exp ) ((void) 0)
211 #define ASSERTMSG( msg, exp ) ((void) 0)
212
213 #endif
214 #endif
215
216 #ifdef NTOS_KERNEL_RUNTIME
217
218 //
219 // Executing RTL functions at DISPATCH_LEVEL or higher will result in a
220 // bugcheck.
221 //
222 #define RTL_PAGED_CODE PAGED_CODE
223
224 #else
225
226 //
227 // This macro does nothing in user mode
228 //
229 #define RTL_PAGED_CODE NOP_FUNCTION
230
231 #endif
232
233 //
234 // RTL Splay Tree Functions
235 //
236 NTSYSAPI
237 PRTL_SPLAY_LINKS
238 NTAPI
239 RtlSplay(
240 IN PRTL_SPLAY_LINKS Links
241 );
242
243 NTSYSAPI
244 PRTL_SPLAY_LINKS
245 NTAPI
246 RtlDelete(IN PRTL_SPLAY_LINKS Links
247 );
248
249 NTSYSAPI
250 VOID
251 NTAPI
252 RtlDeleteNoSplay(
253 IN PRTL_SPLAY_LINKS Links,
254 OUT PRTL_SPLAY_LINKS *Root
255 );
256
257 NTSYSAPI
258 PRTL_SPLAY_LINKS
259 NTAPI
260 RtlSubtreeSuccessor(
261 IN PRTL_SPLAY_LINKS Links
262 );
263
264 NTSYSAPI
265 PRTL_SPLAY_LINKS
266 NTAPI
267 RtlSubtreePredecessor(
268 IN PRTL_SPLAY_LINKS Links
269 );
270
271 NTSYSAPI
272 PRTL_SPLAY_LINKS
273 NTAPI
274 RtlRealSuccessor(
275 IN PRTL_SPLAY_LINKS Links
276 );
277
278 NTSYSAPI
279 PRTL_SPLAY_LINKS
280 NTAPI
281 RtlRealPredecessor(
282 IN PRTL_SPLAY_LINKS Links
283 );
284
285 #define RtlIsLeftChild(Links) \
286 (RtlLeftChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
287
288 #define RtlIsRightChild(Links) \
289 (RtlRightChild(RtlParent(Links)) == (PRTL_SPLAY_LINKS)(Links))
290
291 #define RtlRightChild(Links) \
292 ((PRTL_SPLAY_LINKS)(Links))->RightChild
293
294 #define RtlIsRoot(Links) \
295 (RtlParent(Links) == (PRTL_SPLAY_LINKS)(Links))
296
297 #define RtlLeftChild(Links) \
298 ((PRTL_SPLAY_LINKS)(Links))->LeftChild
299
300 #define RtlParent(Links) \
301 ((PRTL_SPLAY_LINKS)(Links))->Parent
302
303 #define RtlInitializeSplayLinks(Links) \
304 { \
305 PRTL_SPLAY_LINKS _SplayLinks; \
306 _SplayLinks = (PRTL_SPLAY_LINKS)(Links); \
307 _SplayLinks->Parent = _SplayLinks; \
308 _SplayLinks->LeftChild = NULL; \
309 _SplayLinks->RightChild = NULL; \
310 }
311
312 #define RtlInsertAsLeftChild(ParentLinks,ChildLinks) \
313 { \
314 PRTL_SPLAY_LINKS _SplayParent; \
315 PRTL_SPLAY_LINKS _SplayChild; \
316 _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
317 _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
318 _SplayParent->LeftChild = _SplayChild; \
319 _SplayChild->Parent = _SplayParent; \
320 }
321
322 #define RtlInsertAsRightChild(ParentLinks,ChildLinks) \
323 { \
324 PRTL_SPLAY_LINKS _SplayParent; \
325 PRTL_SPLAY_LINKS _SplayChild; \
326 _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
327 _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
328 _SplayParent->RightChild = _SplayChild; \
329 _SplayChild->Parent = _SplayParent; \
330 }
331 #endif
332
333 //
334 // Error and Exception Functions
335 //
336 NTSYSAPI
337 PVOID
338 NTAPI
339 RtlAddVectoredExceptionHandler(
340 IN ULONG FirstHandler,
341 IN PVECTORED_EXCEPTION_HANDLER VectoredHandler
342 );
343
344 NTSYSAPI
345 VOID
346 NTAPI
347 RtlAssert(
348 IN PVOID FailedAssertion,
349 IN PVOID FileName,
350 IN ULONG LineNumber,
351 IN PCHAR Message
352 );
353
354 NTSYSAPI
355 PVOID
356 NTAPI
357 RtlSetUnhandledExceptionFilter(
358 IN PVOID TopLevelExceptionFilter
359 );
360
361 NTSYSAPI
362 VOID
363 NTAPI
364 RtlCaptureContext(
365 OUT PCONTEXT ContextRecord
366 );
367
368 NTSYSAPI
369 PVOID
370 NTAPI
371 RtlEncodePointer(
372 IN PVOID Pointer
373 );
374
375 NTSYSAPI
376 PVOID
377 NTAPI
378 RtlDecodePointer(
379 IN PVOID Pointer
380 );
381
382 NTSYSAPI
383 PVOID
384 NTAPI
385 RtlEncodeSystemPointer(
386 IN PVOID Pointer
387 );
388
389 NTSYSAPI
390 PVOID
391 NTAPI
392 RtlDecodeSystemPointer(
393 IN PVOID Pointer
394 );
395
396 NTSYSAPI
397 BOOLEAN
398 NTAPI
399 RtlDispatchException(
400 IN PEXCEPTION_RECORD ExceptionRecord,
401 IN PCONTEXT Context
402 );
403
404 NTSYSAPI
405 ULONG
406 NTAPI
407 RtlNtStatusToDosError(
408 IN NTSTATUS Status
409 );
410
411 NTSYSAPI
412 ULONG
413 NTAPI
414 RtlNtStatusToDosErrorNoTeb(
415 IN NTSTATUS Status
416 );
417
418 NTSYSAPI
419 VOID
420 NTAPI
421 RtlSetLastWin32ErrorAndNtStatusFromNtStatus(
422 IN NTSTATUS Status
423 );
424
425 NTSYSAPI
426 VOID
427 NTAPI
428 RtlRaiseException(
429 IN PEXCEPTION_RECORD ExceptionRecord
430 );
431
432 DECLSPEC_NORETURN
433 NTSYSAPI
434 VOID
435 NTAPI
436 RtlRaiseStatus(
437 IN NTSTATUS Status
438 );
439
440 NTSYSAPI
441 LONG
442 NTAPI
443 RtlUnhandledExceptionFilter(
444 IN struct _EXCEPTION_POINTERS* ExceptionInfo
445 );
446
447 NTSYSAPI
448 VOID
449 NTAPI
450 RtlUnwind(
451 IN PVOID TargetFrame OPTIONAL,
452 IN PVOID TargetIp OPTIONAL,
453 IN PEXCEPTION_RECORD ExceptionRecord OPTIONAL,
454 IN PVOID ReturnValue
455 );
456
457 //
458 // Tracing Functions
459 //
460 NTSYSAPI
461 ULONG
462 NTAPI
463 RtlWalkFrameChain(
464 OUT PVOID *Callers,
465 IN ULONG Count,
466 IN ULONG Flags
467 );
468
469 NTSYSAPI
470 USHORT
471 NTAPI
472 RtlLogStackBackTrace(
473 VOID
474 );
475
476 //
477 // Heap Functions
478 //
479 NTSYSAPI
480 PVOID
481 NTAPI
482 RtlAllocateHeap(
483 IN HANDLE HeapHandle,
484 IN ULONG Flags,
485 IN SIZE_T Size
486 );
487
488 NTSYSAPI
489 PVOID
490 NTAPI
491 RtlCreateHeap(
492 IN ULONG Flags,
493 IN PVOID BaseAddress OPTIONAL,
494 IN SIZE_T SizeToReserve OPTIONAL,
495 IN SIZE_T SizeToCommit OPTIONAL,
496 IN PVOID Lock OPTIONAL,
497 IN PRTL_HEAP_PARAMETERS Parameters OPTIONAL
498 );
499
500 NTSYSAPI
501 ULONG
502 NTAPI
503 RtlCreateTagHeap(
504 IN HANDLE HeapHandle,
505 IN ULONG Flags,
506 IN PWSTR TagName,
507 IN PWSTR TagSubName
508 );
509
510 ULONG
511 NTAPI
512 RtlCompactHeap(
513 HANDLE Heap,
514 ULONG Flags
515 );
516
517 NTSYSAPI
518 PVOID
519 NTAPI
520 RtlDebugCreateHeap(
521 IN ULONG Flags,
522 IN PVOID BaseAddress OPTIONAL,
523 IN SIZE_T SizeToReserve OPTIONAL,
524 IN SIZE_T SizeToCommit OPTIONAL,
525 IN PVOID Lock OPTIONAL,
526 IN PRTL_HEAP_PARAMETERS Parameters OPTIONAL
527 );
528
529 NTSYSAPI
530 HANDLE
531 NTAPI
532 RtlDestroyHeap(
533 IN HANDLE Heap
534 );
535
536 NTSYSAPI
537 ULONG
538 NTAPI
539 RtlExtendHeap(
540 IN HANDLE Heap,
541 IN ULONG Flags,
542 IN PVOID P,
543 IN SIZE_T Size
544 );
545
546 NTSYSAPI
547 BOOLEAN
548 NTAPI
549 RtlFreeHeap(
550 IN HANDLE HeapHandle,
551 IN ULONG Flags,
552 IN PVOID P
553 );
554
555 NTSYSAPI
556 ULONG
557 NTAPI
558 RtlGetNtGlobalFlags(
559 VOID
560 );
561
562 ULONG
563 NTAPI
564 RtlGetProcessHeaps(
565 ULONG HeapCount,
566 HANDLE *HeapArray
567 );
568
569 BOOLEAN
570 NTAPI
571 RtlGetUserInfoHeap(
572 IN PVOID HeapHandle,
573 IN ULONG Flags,
574 IN PVOID BaseAddress,
575 OUT PVOID *UserValue,
576 OUT PULONG UserFlags
577 );
578
579 NTSYSAPI
580 PVOID
581 NTAPI
582 RtlProtectHeap(
583 IN PVOID HeapHandle,
584 IN BOOLEAN Protect
585 );
586
587 NTSYSAPI
588 PWSTR
589 NTAPI
590 RtlQueryTagHeap(
591 IN PVOID HeapHandle,
592 IN ULONG Flags,
593 IN USHORT TagIndex,
594 IN BOOLEAN ResetCounters,
595 OUT PRTL_HEAP_TAG_INFO HeapTagInfo
596 );
597
598 NTSYSAPI
599 PVOID
600 NTAPI
601 RtlReAllocateHeap(
602 HANDLE Heap,
603 ULONG Flags,
604 PVOID Ptr,
605 SIZE_T Size
606 );
607
608 NTSYSAPI
609 BOOLEAN
610 NTAPI
611 RtlLockHeap(
612 IN HANDLE Heap
613 );
614
615 NTSYSAPI
616 NTSTATUS
617 NTAPI
618 RtlUsageHeap(
619 IN HANDLE Heap,
620 IN ULONG Flags,
621 OUT PRTL_HEAP_USAGE Usage
622 );
623
624 NTSYSAPI
625 BOOLEAN
626 NTAPI
627 RtlUnlockHeap(
628 IN HANDLE Heap
629 );
630
631 BOOLEAN
632 NTAPI
633 RtlSetUserValueHeap(
634 IN PVOID HeapHandle,
635 IN ULONG Flags,
636 IN PVOID BaseAddress,
637 IN PVOID UserValue
638 );
639
640 BOOLEAN
641 NTAPI
642 RtlSetUserFlagsHeap(
643 IN PVOID HeapHandle,
644 IN ULONG Flags,
645 IN PVOID BaseAddress,
646 IN ULONG UserFlags
647 );
648
649 NTSYSAPI
650 SIZE_T
651 NTAPI
652 RtlSizeHeap(
653 IN PVOID HeapHandle,
654 IN ULONG Flags,
655 IN PVOID MemoryPointer
656 );
657
658 NTSYSAPI
659 BOOLEAN
660 NTAPI
661 RtlValidateHeap(
662 HANDLE Heap,
663 ULONG Flags,
664 PVOID P
665 );
666
667 NTSYSAPI
668 NTSTATUS
669 NTAPI
670 RtlWalkHeap(
671 IN HANDLE HeapHandle,
672 IN PVOID HeapEntry
673 );
674
675 #define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
676
677 //
678 // Security Functions
679 //
680 NTSYSAPI
681 NTSTATUS
682 NTAPI
683 RtlAbsoluteToSelfRelativeSD(
684 IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
685 IN OUT PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor,
686 IN PULONG BufferLength
687 );
688
689 NTSYSAPI
690 NTSTATUS
691 NTAPI
692 RtlAddAccessAllowedAce(
693 PACL Acl,
694 ULONG Revision,
695 ACCESS_MASK AccessMask,
696 PSID Sid
697 );
698
699 NTSYSAPI
700 NTSTATUS
701 NTAPI
702 RtlAddAccessAllowedAceEx(
703 IN OUT PACL pAcl,
704 IN ULONG dwAceRevision,
705 IN ULONG AceFlags,
706 IN ACCESS_MASK AccessMask,
707 IN PSID pSid
708 );
709
710 NTSYSAPI
711 NTSTATUS
712 NTAPI
713 RtlAddAccessAllowedObjectAce(
714 IN OUT PACL pAcl,
715 IN ULONG dwAceRevision,
716 IN ULONG AceFlags,
717 IN ACCESS_MASK AccessMask,
718 IN GUID *ObjectTypeGuid OPTIONAL,
719 IN GUID *InheritedObjectTypeGuid OPTIONAL,
720 IN PSID pSid
721 );
722
723 NTSYSAPI
724 NTSTATUS
725 NTAPI
726 RtlAddAccessDeniedAce(
727 PACL Acl,
728 ULONG Revision,
729 ACCESS_MASK AccessMask,
730 PSID Sid
731 );
732
733 NTSYSAPI
734 NTSTATUS
735 NTAPI
736 RtlAddAccessDeniedAceEx(
737 IN OUT PACL Acl,
738 IN ULONG Revision,
739 IN ULONG Flags,
740 IN ACCESS_MASK AccessMask,
741 IN PSID Sid
742 );
743
744 NTSYSAPI
745 NTSTATUS
746 NTAPI
747 RtlAddAccessDeniedObjectAce(
748 IN OUT PACL pAcl,
749 IN ULONG dwAceRevision,
750 IN ULONG AceFlags,
751 IN ACCESS_MASK AccessMask,
752 IN GUID *ObjectTypeGuid OPTIONAL,
753 IN GUID *InheritedObjectTypeGuid OPTIONAL,
754 IN PSID pSid
755 );
756
757 NTSYSAPI
758 NTSTATUS
759 NTAPI
760 RtlAddAce(
761 PACL Acl,
762 ULONG AceRevision,
763 ULONG StartingAceIndex,
764 PVOID AceList,
765 ULONG AceListLength
766 );
767
768 NTSYSAPI
769 NTSTATUS
770 NTAPI
771 RtlAddAuditAccessAce(
772 PACL Acl,
773 ULONG Revision,
774 ACCESS_MASK AccessMask,
775 PSID Sid,
776 BOOLEAN Success,
777 BOOLEAN Failure
778 );
779
780 NTSYSAPI
781 NTSTATUS
782 NTAPI
783 RtlAcquirePrivilege(
784 IN PULONG Privilege,
785 IN ULONG NumPriv,
786 IN ULONG Flags,
787 OUT PVOID *ReturnedState
788 );
789
790 NTSYSAPI
791 NTSTATUS
792 NTAPI
793 RtlAddAuditAccessAceEx(
794 IN OUT PACL Acl,
795 IN ULONG Revision,
796 IN ULONG Flags,
797 IN ACCESS_MASK AccessMask,
798 IN PSID Sid,
799 IN BOOLEAN Success,
800 IN BOOLEAN Failure
801 );
802
803 NTSYSAPI
804 NTSTATUS
805 NTAPI
806 RtlAddAuditAccessObjectAce(
807 IN OUT PACL Acl,
808 IN ULONG Revision,
809 IN ULONG Flags,
810 IN ACCESS_MASK AccessMask,
811 IN GUID *ObjectTypeGuid OPTIONAL,
812 IN GUID *InheritedObjectTypeGuid OPTIONAL,
813 IN PSID Sid,
814 IN BOOLEAN Success,
815 IN BOOLEAN Failure
816 );
817
818 NTSYSAPI
819 NTSTATUS
820 NTAPI
821 RtlAddMandatoryAce(
822 IN OUT PACL Acl,
823 IN ULONG Revision,
824 IN ULONG Flags,
825 IN ULONG MandatoryFlags,
826 IN ULONG AceType,
827 IN PSID LabelSid);
828
829 NTSYSAPI
830 NTSTATUS
831 NTAPI
832 RtlAdjustPrivilege(
833 IN ULONG Privilege,
834 IN BOOLEAN NewValue,
835 IN BOOLEAN ForThread,
836 OUT PBOOLEAN OldValue
837 );
838
839 NTSYSAPI
840 NTSTATUS
841 NTAPI
842 RtlAllocateAndInitializeSid(
843 IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
844 IN UCHAR SubAuthorityCount,
845 IN ULONG SubAuthority0,
846 IN ULONG SubAuthority1,
847 IN ULONG SubAuthority2,
848 IN ULONG SubAuthority3,
849 IN ULONG SubAuthority4,
850 IN ULONG SubAuthority5,
851 IN ULONG SubAuthority6,
852 IN ULONG SubAuthority7,
853 OUT PSID *Sid
854 );
855
856 NTSYSAPI
857 BOOLEAN
858 NTAPI
859 RtlAreAllAccessesGranted(
860 ACCESS_MASK GrantedAccess,
861 ACCESS_MASK DesiredAccess
862 );
863
864 NTSYSAPI
865 BOOLEAN
866 NTAPI
867 RtlAreAnyAccessesGranted(
868 ACCESS_MASK GrantedAccess,
869 ACCESS_MASK DesiredAccess
870 );
871
872 NTSYSAPI
873 VOID
874 NTAPI
875 RtlCopyLuid(
876 IN PLUID LuidDest,
877 IN PLUID LuidSrc
878 );
879
880 NTSYSAPI
881 VOID
882 NTAPI
883 RtlCopyLuidAndAttributesArray(
884 ULONG Count,
885 PLUID_AND_ATTRIBUTES Src,
886 PLUID_AND_ATTRIBUTES Dest
887 );
888
889 NTSYSAPI
890 NTSTATUS
891 NTAPI
892 RtlCopySidAndAttributesArray(
893 ULONG Count,
894 PSID_AND_ATTRIBUTES Src,
895 ULONG SidAreaSize,
896 PSID_AND_ATTRIBUTES Dest,
897 PVOID SidArea,
898 PVOID* RemainingSidArea,
899 PULONG RemainingSidAreaSize
900 );
901
902 NTSYSAPI
903 NTSTATUS
904 NTAPI
905 RtlConvertSidToUnicodeString(
906 OUT PUNICODE_STRING DestinationString,
907 IN PSID Sid,
908 IN BOOLEAN AllocateDestinationString
909 );
910
911 NTSYSAPI
912 NTSTATUS
913 NTAPI
914 RtlCopySid(
915 IN ULONG Length,
916 IN PSID Destination,
917 IN PSID Source
918 );
919
920 NTSYSAPI
921 NTSTATUS
922 NTAPI
923 RtlCreateAcl(
924 PACL Acl,
925 ULONG AclSize,
926 ULONG AclRevision
927 );
928
929 NTSYSAPI
930 NTSTATUS
931 NTAPI
932 RtlCreateSecurityDescriptor(
933 OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
934 IN ULONG Revision
935 );
936
937 NTSYSAPI
938 NTSTATUS
939 NTAPI
940 RtlCreateSecurityDescriptorRelative(
941 OUT PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor,
942 IN ULONG Revision
943 );
944
945 NTSYSAPI
946 NTSTATUS
947 NTAPI
948 RtlCopySecurityDescriptor(
949 IN PSECURITY_DESCRIPTOR pSourceSecurityDescriptor,
950 OUT PSECURITY_DESCRIPTOR pDestinationSecurityDescriptor
951 );
952
953 NTSYSAPI
954 NTSTATUS
955 NTAPI
956 RtlDeleteAce(
957 PACL Acl,
958 ULONG AceIndex
959 );
960
961 NTSYSAPI
962 BOOLEAN
963 NTAPI
964 RtlEqualPrefixSid(
965 PSID Sid1,
966 PSID Sid2
967 );
968
969 NTSYSAPI
970 BOOLEAN
971 NTAPI
972 RtlEqualSid (
973 IN PSID Sid1,
974 IN PSID Sid2
975 );
976
977 NTSYSAPI
978 BOOLEAN
979 NTAPI
980 RtlFirstFreeAce(
981 PACL Acl,
982 PACE* Ace
983 );
984
985 NTSYSAPI
986 PVOID
987 NTAPI
988 RtlFreeSid (
989 IN PSID Sid
990 );
991
992 NTSYSAPI
993 NTSTATUS
994 NTAPI
995 RtlGetAce(
996 PACL Acl,
997 ULONG AceIndex,
998 PVOID *Ace
999 );
1000
1001 NTSYSAPI
1002 NTSTATUS
1003 NTAPI
1004 RtlGetControlSecurityDescriptor(
1005 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
1006 OUT PSECURITY_DESCRIPTOR_CONTROL Control,
1007 OUT PULONG Revision
1008 );
1009
1010 NTSYSAPI
1011 NTSTATUS
1012 NTAPI
1013 RtlGetDaclSecurityDescriptor(
1014 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
1015 OUT PBOOLEAN DaclPresent,
1016 OUT PACL *Dacl,
1017 OUT PBOOLEAN DaclDefaulted
1018 );
1019
1020 NTSYSAPI
1021 NTSTATUS
1022 NTAPI
1023 RtlGetSaclSecurityDescriptor(
1024 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
1025 OUT PBOOLEAN SaclPresent,
1026 OUT PACL* Sacl,
1027 OUT PBOOLEAN SaclDefaulted
1028 );
1029
1030 NTSYSAPI
1031 NTSTATUS
1032 NTAPI
1033 RtlGetGroupSecurityDescriptor(
1034 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
1035 OUT PSID *Group,
1036 OUT PBOOLEAN GroupDefaulted
1037 );
1038
1039 NTSYSAPI
1040 NTSTATUS
1041 NTAPI
1042 RtlGetOwnerSecurityDescriptor(
1043 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
1044 OUT PSID *Owner,
1045 OUT PBOOLEAN OwnerDefaulted
1046 );
1047
1048 NTSYSAPI
1049 BOOLEAN
1050 NTAPI
1051 RtlGetSecurityDescriptorRMControl(
1052 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
1053 OUT PUCHAR RMControl
1054 );
1055
1056 NTSYSAPI
1057 PSID_IDENTIFIER_AUTHORITY
1058 NTAPI
1059 RtlIdentifierAuthoritySid(PSID Sid);
1060
1061 NTSYSAPI
1062 NTSTATUS
1063 NTAPI
1064 RtlImpersonateSelf(IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel);
1065
1066 NTSYSAPI
1067 NTSTATUS
1068 NTAPI
1069 RtlInitializeSid(
1070 IN OUT PSID Sid,
1071 IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
1072 IN UCHAR SubAuthorityCount
1073 );
1074
1075 NTSYSAPI
1076 ULONG
1077 NTAPI
1078 RtlLengthRequiredSid(IN ULONG SubAuthorityCount);
1079
1080 NTSYSAPI
1081 ULONG
1082 NTAPI
1083 RtlLengthSid(IN PSID Sid);
1084
1085 NTSYSAPI
1086 NTSTATUS
1087 NTAPI
1088 RtlMakeSelfRelativeSD(
1089 IN PSECURITY_DESCRIPTOR AbsoluteSD,
1090 OUT PSECURITY_DESCRIPTOR SelfRelativeSD,
1091 IN OUT PULONG BufferLength);
1092
1093 NTSYSAPI
1094 VOID
1095 NTAPI
1096 RtlMapGenericMask(
1097 PACCESS_MASK AccessMask,
1098 PGENERIC_MAPPING GenericMapping
1099 );
1100
1101 #ifdef NTOS_MODE_USER
1102
1103 NTSYSAPI
1104 NTSTATUS
1105 NTAPI
1106 RtlQueryInformationAcl(
1107 PACL Acl,
1108 PVOID Information,
1109 ULONG InformationLength,
1110 ACL_INFORMATION_CLASS InformationClass
1111 );
1112
1113 #endif
1114
1115 NTSYSAPI
1116 VOID
1117 NTAPI
1118 RtlReleasePrivilege(
1119 IN PVOID ReturnedState
1120 );
1121
1122 NTSYSAPI
1123 NTSTATUS
1124 NTAPI
1125 RtlSelfRelativeToAbsoluteSD(
1126 IN PSECURITY_DESCRIPTOR SelfRelativeSD,
1127 OUT PSECURITY_DESCRIPTOR AbsoluteSD,
1128 IN PULONG AbsoluteSDSize,
1129 IN PACL Dacl,
1130 IN PULONG DaclSize,
1131 IN PACL Sacl,
1132 IN PULONG SaclSize,
1133 IN PSID Owner,
1134 IN PULONG OwnerSize,
1135 IN PSID PrimaryGroup,
1136 IN PULONG PrimaryGroupSize
1137 );
1138
1139 NTSYSAPI
1140 NTSTATUS
1141 NTAPI
1142 RtlSelfRelativeToAbsoluteSD2(
1143 IN OUT PSECURITY_DESCRIPTOR SelfRelativeSD,
1144 OUT PULONG BufferSize
1145 );
1146
1147 NTSYSAPI
1148 NTSTATUS
1149 NTAPI
1150 RtlSetAttributesSecurityDescriptor(
1151 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
1152 IN SECURITY_DESCRIPTOR_CONTROL Control,
1153 OUT PULONG Revision
1154 );
1155
1156 NTSYSAPI
1157 NTSTATUS
1158 NTAPI
1159 RtlSetControlSecurityDescriptor(
1160 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
1161 IN SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,
1162 IN SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet
1163 );
1164
1165 NTSYSAPI
1166 NTSTATUS
1167 NTAPI
1168 RtlSetDaclSecurityDescriptor (
1169 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
1170 IN BOOLEAN DaclPresent,
1171 IN PACL Dacl,
1172 IN BOOLEAN DaclDefaulted
1173 );
1174
1175 NTSYSAPI
1176 NTSTATUS
1177 NTAPI
1178 RtlSetGroupSecurityDescriptor(
1179 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
1180 IN PSID Group,
1181 IN BOOLEAN GroupDefaulted
1182 );
1183
1184 #ifdef NTOS_MODE_USER
1185
1186 NTSYSAPI
1187 NTSTATUS
1188 NTAPI
1189 RtlSetInformationAcl(
1190 PACL Acl,
1191 PVOID Information,
1192 ULONG InformationLength,
1193 ACL_INFORMATION_CLASS InformationClass
1194 );
1195
1196 #endif
1197
1198 NTSYSAPI
1199 NTSTATUS
1200 NTAPI
1201 RtlSetOwnerSecurityDescriptor(
1202 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
1203 IN PSID Owner,
1204 IN BOOLEAN OwnerDefaulted
1205 );
1206
1207 NTSYSAPI
1208 NTSTATUS
1209 NTAPI
1210 RtlSetSaclSecurityDescriptor(
1211 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
1212 IN BOOLEAN SaclPresent,
1213 IN PACL Sacl,
1214 IN BOOLEAN SaclDefaulted
1215 );
1216
1217 NTSYSAPI
1218 VOID
1219 NTAPI
1220 RtlSetSecurityDescriptorRMControl(
1221 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor,
1222 IN PUCHAR RMControl
1223 );
1224
1225 NTSYSAPI
1226 PUCHAR
1227 NTAPI
1228 RtlSubAuthorityCountSid(
1229 IN PSID Sid
1230 );
1231
1232 NTSYSAPI
1233 PULONG
1234 NTAPI
1235 RtlSubAuthoritySid(
1236 IN PSID Sid,
1237 IN ULONG SubAuthority
1238 );
1239
1240 NTSYSAPI
1241 BOOLEAN
1242 NTAPI
1243 RtlValidRelativeSecurityDescriptor(
1244 IN PSECURITY_DESCRIPTOR SecurityDescriptorInput,
1245 IN ULONG SecurityDescriptorLength,
1246 IN SECURITY_INFORMATION RequiredInformation
1247 );
1248
1249 NTSYSAPI
1250 BOOLEAN
1251 NTAPI
1252 RtlValidSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor);
1253
1254 NTSYSAPI
1255 BOOLEAN
1256 NTAPI
1257 RtlValidSid(IN PSID Sid);
1258
1259 NTSYSAPI
1260 BOOLEAN
1261 NTAPI
1262 RtlValidAcl(PACL Acl);
1263
1264 NTSYSAPI
1265 NTSTATUS
1266 NTAPI
1267 RtlDeleteSecurityObject(
1268 IN PSECURITY_DESCRIPTOR *ObjectDescriptor
1269 );
1270
1271 NTSYSAPI
1272 NTSTATUS
1273 NTAPI
1274 RtlNewSecurityObject(
1275 IN PSECURITY_DESCRIPTOR ParentDescriptor,
1276 IN PSECURITY_DESCRIPTOR CreatorDescriptor,
1277 OUT PSECURITY_DESCRIPTOR *NewDescriptor,
1278 IN BOOLEAN IsDirectoryObject,
1279 IN HANDLE Token,
1280 IN PGENERIC_MAPPING GenericMapping
1281 );
1282
1283 NTSYSAPI
1284 NTSTATUS
1285 NTAPI
1286 RtlQuerySecurityObject(
1287 IN PSECURITY_DESCRIPTOR ObjectDescriptor,
1288 IN SECURITY_INFORMATION SecurityInformation,
1289 OUT PSECURITY_DESCRIPTOR ResultantDescriptor,
1290 IN ULONG DescriptorLength,
1291 OUT PULONG ReturnLength
1292 );
1293
1294 NTSYSAPI
1295 NTSTATUS
1296 NTAPI
1297 RtlSetSecurityObject(
1298 IN SECURITY_INFORMATION SecurityInformation,
1299 IN PSECURITY_DESCRIPTOR ModificationDescriptor,
1300 OUT PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
1301 IN PGENERIC_MAPPING GenericMapping,
1302 IN HANDLE Token
1303 );
1304
1305 //
1306 // Single-Character Functions
1307 //
1308 NTSYSAPI
1309 NTSTATUS
1310 NTAPI
1311 RtlLargeIntegerToChar(
1312 IN PLARGE_INTEGER Value,
1313 IN ULONG Base,
1314 IN ULONG Length,
1315 IN OUT PCHAR String
1316 );
1317
1318 NTSYSAPI
1319 CHAR
1320 NTAPI
1321 RtlUpperChar(CHAR Source);
1322
1323 NTSYSAPI
1324 WCHAR
1325 NTAPI
1326 RtlUpcaseUnicodeChar(WCHAR Source);
1327
1328 NTSYSAPI
1329 WCHAR
1330 NTAPI
1331 RtlDowncaseUnicodeChar(IN WCHAR Source);
1332
1333 NTSYSAPI
1334 NTSTATUS
1335 NTAPI
1336 RtlIntegerToChar(
1337 IN ULONG Value,
1338 IN ULONG Base,
1339 IN ULONG Length,
1340 IN OUT PCHAR String
1341 );
1342
1343 NTSYSAPI
1344 NTSTATUS
1345 NTAPI
1346 RtlIntegerToUnicode(
1347 IN ULONG Value,
1348 IN ULONG Base OPTIONAL,
1349 IN ULONG Length OPTIONAL,
1350 IN OUT LPWSTR String
1351 );
1352
1353 NTSYSAPI
1354 NTSTATUS
1355 NTAPI
1356 RtlIntegerToUnicodeString(
1357 IN ULONG Value,
1358 IN ULONG Base,
1359 IN OUT PUNICODE_STRING String
1360 );
1361
1362 NTSYSAPI
1363 NTSTATUS
1364 NTAPI
1365 RtlCharToInteger(
1366 PCSZ String,
1367 ULONG Base,
1368 PULONG Value
1369 );
1370
1371 //
1372 // Byte Swap Functions
1373 //
1374 #ifdef NTOS_MODE_USER
1375
1376 #if (defined(_M_IX86) && (_MSC_FULL_VER > 13009037)) || \
1377 ((defined(_M_AMD64) || \
1378 defined(_M_IA64)) && (_MSC_FULL_VER > 13009175))
1379
1380 unsigned short __cdecl _byteswap_ushort(unsigned short);
1381 unsigned long __cdecl _byteswap_ulong (unsigned long);
1382 unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64);
1383 #pragma intrinsic(_byteswap_ushort)
1384 #pragma intrinsic(_byteswap_ulong)
1385 #pragma intrinsic(_byteswap_uint64)
1386 #define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x))
1387 #define RtlUlongByteSwap(_x) _byteswap_ulong((_x))
1388 #define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
1389
1390 #elif defined (__GNUC__)
1391
1392 #define RtlUshortByteSwap(_x) _byteswap_ushort((USHORT)(_x))
1393 #define RtlUlongByteSwap(_x) _byteswap_ulong((_x))
1394 #define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x))
1395
1396 #else
1397
1398 #if (NTDDI_VERSION >= NTDDI_WIN2K)
1399 NTSYSAPI
1400 USHORT
1401 FASTCALL
1402 RtlUshortByteSwap(IN USHORT Source);
1403
1404 NTSYSAPI
1405 ULONG
1406 FASTCALL
1407 RtlUlongByteSwap(IN ULONG Source);
1408
1409 NTSYSAPI
1410 ULONGLONG
1411 FASTCALL
1412 RtlUlonglongByteSwap(IN ULONGLONG Source);
1413 #endif
1414
1415 #endif
1416 #endif // NTOS_MODE_USER
1417
1418 //
1419 // Unicode->Ansi String Functions
1420 //
1421 NTSYSAPI
1422 ULONG
1423 NTAPI
1424 RtlxUnicodeStringToAnsiSize(IN PCUNICODE_STRING UnicodeString);
1425
1426 #ifdef NTOS_MODE_USER
1427
1428 #define RtlUnicodeStringToAnsiSize(STRING) ( \
1429 NLS_MB_CODE_PAGE_TAG ? \
1430 RtlxUnicodeStringToAnsiSize(STRING) : \
1431 ((STRING)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
1432 )
1433
1434 #endif
1435
1436 NTSYSAPI
1437 NTSTATUS
1438 NTAPI
1439 RtlUnicodeStringToAnsiString(
1440 PANSI_STRING DestinationString,
1441 PCUNICODE_STRING SourceString,
1442 BOOLEAN AllocateDestinationString
1443 );
1444
1445 //
1446 // Unicode->OEM String Functions
1447 //
1448 NTSYSAPI
1449 NTSTATUS
1450 NTAPI
1451 RtlUpcaseUnicodeStringToOemString(
1452 POEM_STRING DestinationString,
1453 PCUNICODE_STRING SourceString,
1454 BOOLEAN AllocateDestinationString
1455 );
1456
1457 NTSYSAPI
1458 NTSTATUS
1459 NTAPI
1460 RtlUpcaseUnicodeStringToCountedOemString(
1461 IN OUT POEM_STRING DestinationString,
1462 IN PCUNICODE_STRING SourceString,
1463 IN BOOLEAN AllocateDestinationString
1464 );
1465
1466 NTSYSAPI
1467 NTSTATUS
1468 NTAPI
1469 RtlUnicodeStringToOemString(
1470 POEM_STRING DestinationString,
1471 PCUNICODE_STRING SourceString,
1472 BOOLEAN AllocateDestinationString
1473 );
1474
1475 NTSYSAPI
1476 NTSTATUS
1477 NTAPI
1478 RtlUpcaseUnicodeToOemN(
1479 PCHAR OemString,
1480 ULONG OemSize,
1481 PULONG ResultSize,
1482 PCWCH UnicodeString,
1483 ULONG UnicodeSize
1484 );
1485
1486 NTSYSAPI
1487 ULONG
1488 NTAPI
1489 RtlxUnicodeStringToOemSize(IN PCUNICODE_STRING UnicodeString);
1490
1491 #ifdef NTOS_MODE_USER
1492
1493 #define RtlUnicodeStringToOemSize(STRING) ( \
1494 NLS_MB_OEM_CODE_PAGE_TAG ? \
1495 RtlxUnicodeStringToOemSize(STRING) : \
1496 ((STRING)->Length + sizeof(UNICODE_NULL)) / sizeof(WCHAR) \
1497 )
1498
1499 #define RtlUnicodeStringToCountedOemSize(STRING) ( \
1500 (ULONG)(RtlUnicodeStringToOemSize(STRING) - sizeof(ANSI_NULL)) \
1501 )
1502
1503 #endif
1504
1505 NTSYSAPI
1506 NTSTATUS
1507 NTAPI
1508 RtlUnicodeToOemN(
1509 PCHAR OemString,
1510 ULONG OemSize,
1511 PULONG ResultSize,
1512 PCWCH UnicodeString,
1513 ULONG UnicodeSize
1514 );
1515
1516 //
1517 // Unicode->MultiByte String Functions
1518 //
1519 NTSYSAPI
1520 NTSTATUS
1521 NTAPI
1522 RtlUnicodeToMultiByteN(
1523 PCHAR MbString,
1524 ULONG MbSize,
1525 PULONG ResultSize,
1526 PWCHAR UnicodeString,
1527 ULONG UnicodeSize
1528 );
1529
1530 NTSYSAPI
1531 NTSTATUS
1532 NTAPI
1533 RtlUpcaseUnicodeToMultiByteN(
1534 PCHAR MbString,
1535 ULONG MbSize,
1536 PULONG ResultSize,
1537 PCWCH UnicodeString,
1538 ULONG UnicodeSize
1539 );
1540
1541 NTSYSAPI
1542 NTSTATUS
1543 NTAPI
1544 RtlUnicodeToMultiByteSize(
1545 PULONG MbSize,
1546 PCWCH UnicodeString,
1547 ULONG UnicodeSize
1548 );
1549
1550 NTSYSAPI
1551 ULONG
1552 NTAPI
1553 RtlxOemStringToUnicodeSize(IN PCOEM_STRING OemString);
1554
1555 //
1556 // OEM to Unicode Functions
1557 //
1558 NTSYSAPI
1559 NTSTATUS
1560 NTAPI
1561 RtlOemStringToUnicodeString(
1562 PUNICODE_STRING DestinationString,
1563 PCOEM_STRING SourceString,
1564 BOOLEAN AllocateDestinationString
1565 );
1566
1567 NTSYSAPI
1568 NTSTATUS
1569 NTAPI
1570 RtlOemToUnicodeN(
1571 PWSTR UnicodeString,
1572 ULONG MaxBytesInUnicodeString,
1573 PULONG BytesInUnicodeString,
1574 IN PCCH OemString,
1575 ULONG BytesInOemString
1576 );
1577
1578 #ifdef NTOS_MODE_USER
1579
1580 #define RtlOemStringToUnicodeSize(STRING) ( \
1581 NLS_MB_OEM_CODE_PAGE_TAG ? \
1582 RtlxOemStringToUnicodeSize(STRING) : \
1583 ((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
1584 )
1585
1586 #define RtlOemStringToCountedUnicodeSize(STRING) ( \
1587 (ULONG)(RtlOemStringToUnicodeSize(STRING) - sizeof(UNICODE_NULL)) \
1588 )
1589
1590 #endif
1591
1592 //
1593 // Ansi->Unicode String Functions
1594 //
1595 NTSYSAPI
1596 ULONG
1597 NTAPI
1598 RtlxAnsiStringToUnicodeSize(
1599 PCANSI_STRING AnsiString
1600 );
1601
1602 NTSYSAPI
1603 NTSTATUS
1604 NTAPI
1605 RtlAnsiStringToUnicodeString(
1606 PUNICODE_STRING DestinationString,
1607 PCANSI_STRING SourceString,
1608 BOOLEAN AllocateDestinationString
1609 );
1610
1611 #ifdef NTOS_MODE_USER
1612
1613 #define RtlAnsiStringToUnicodeSize(STRING) ( \
1614 NLS_MB_CODE_PAGE_TAG ? \
1615 RtlxAnsiStringToUnicodeSize(STRING) : \
1616 ((STRING)->Length + sizeof(ANSI_NULL)) * sizeof(WCHAR) \
1617 )
1618
1619 #endif
1620
1621 NTSYSAPI
1622 BOOLEAN
1623 NTAPI
1624 RtlCreateUnicodeStringFromAsciiz(
1625 OUT PUNICODE_STRING Destination,
1626 IN PCSZ Source
1627 );
1628
1629 //
1630 // Unicode String Functions
1631 //
1632 NTSYSAPI
1633 NTSTATUS
1634 NTAPI
1635 RtlAppendUnicodeToString(
1636 PUNICODE_STRING Destination,
1637 PCWSTR Source
1638 );
1639
1640 NTSYSAPI
1641 NTSTATUS
1642 NTAPI
1643 RtlAppendUnicodeStringToString(
1644 PUNICODE_STRING Destination,
1645 PCUNICODE_STRING Source
1646 );
1647
1648 NTSYSAPI
1649 LONG
1650 NTAPI
1651 RtlCompareUnicodeString(
1652 PCUNICODE_STRING String1,
1653 PCUNICODE_STRING String2,
1654 BOOLEAN CaseInsensitive
1655 );
1656
1657 NTSYSAPI
1658 VOID
1659 NTAPI
1660 RtlCopyUnicodeString(
1661 PUNICODE_STRING DestinationString,
1662 PCUNICODE_STRING SourceString
1663 );
1664
1665 NTSYSAPI
1666 BOOLEAN
1667 NTAPI
1668 RtlCreateUnicodeString(
1669 PUNICODE_STRING DestinationString,
1670 PCWSTR SourceString
1671 );
1672
1673 #ifdef NTOS_MODE_USER
1674
1675 NTSYSAPI
1676 NTSTATUS
1677 NTAPI
1678 RtlDowncaseUnicodeString(
1679 IN OUT PUNICODE_STRING UniDest,
1680 IN PCUNICODE_STRING UniSource,
1681 IN BOOLEAN AllocateDestinationString
1682 );
1683
1684 NTSYSAPI
1685 NTSTATUS
1686 NTAPI
1687 RtlDuplicateUnicodeString(
1688 IN ULONG Flags,
1689 IN PCUNICODE_STRING SourceString,
1690 OUT PUNICODE_STRING DestinationString
1691 );
1692
1693 //
1694 // Memory Functions
1695 //
1696 NTSYSAPI
1697 VOID
1698 NTAPI
1699 RtlFillMemoryUlong(
1700 IN PVOID Destination,
1701 IN ULONG Length,
1702 IN ULONG Fill
1703 );
1704
1705 #endif
1706
1707 NTSYSAPI
1708 BOOLEAN
1709 NTAPI
1710 RtlEqualUnicodeString(
1711 PCUNICODE_STRING String1,
1712 PCUNICODE_STRING String2,
1713 BOOLEAN CaseInsensitive
1714 );
1715
1716 NTSYSAPI
1717 NTSTATUS
1718 NTAPI
1719 RtlFindCharInUnicodeString(
1720 IN ULONG Flags,
1721 IN PUNICODE_STRING SearchString,
1722 IN PCUNICODE_STRING MatchString,
1723 OUT PUSHORT Position
1724 );
1725
1726 NTSYSAPI
1727 VOID
1728 NTAPI
1729 RtlFreeUnicodeString(IN PUNICODE_STRING UnicodeString);
1730
1731 NTSYSAPI
1732 NTSTATUS
1733 NTAPI
1734 RtlHashUnicodeString(
1735 IN CONST UNICODE_STRING *String,
1736 IN BOOLEAN CaseInSensitive,
1737 IN ULONG HashAlgorithm,
1738 OUT PULONG HashValue
1739 );
1740
1741 NTSYSAPI
1742 VOID
1743 NTAPI
1744 RtlInitUnicodeString(
1745 IN OUT PUNICODE_STRING DestinationString,
1746 IN PCWSTR SourceString
1747 );
1748
1749 NTSYSAPI
1750 NTSTATUS
1751 NTAPI
1752 RtlInitUnicodeStringEx(
1753 OUT PUNICODE_STRING DestinationString,
1754 IN PCWSTR SourceString OPTIONAL
1755 );
1756
1757 NTSYSAPI
1758 BOOLEAN
1759 NTAPI
1760 RtlIsTextUnicode(
1761 PVOID Buffer,
1762 INT Length,
1763 INT *Flags
1764 );
1765
1766 NTSYSAPI
1767 BOOLEAN
1768 NTAPI
1769 RtlPrefixString(
1770 PCANSI_STRING String1,
1771 PCANSI_STRING String2,
1772 BOOLEAN CaseInsensitive
1773 );
1774
1775 NTSYSAPI
1776 BOOLEAN
1777 NTAPI
1778 RtlPrefixUnicodeString(
1779 PCUNICODE_STRING String1,
1780 PCUNICODE_STRING String2,
1781 BOOLEAN CaseInsensitive
1782 );
1783
1784 NTSYSAPI
1785 NTSTATUS
1786 NTAPI
1787 RtlUpcaseUnicodeString(
1788 PUNICODE_STRING DestinationString,
1789 PCUNICODE_STRING SourceString,
1790 BOOLEAN AllocateDestinationString
1791 );
1792
1793 NTSYSAPI
1794 NTSTATUS
1795 NTAPI
1796 RtlUnicodeStringToInteger(
1797 PCUNICODE_STRING String,
1798 ULONG Base,
1799 PULONG Value
1800 );
1801
1802 NTSYSAPI
1803 NTSTATUS
1804 NTAPI
1805 RtlValidateUnicodeString(
1806 IN ULONG Flags,
1807 IN PCUNICODE_STRING String
1808 );
1809
1810 //
1811 // Ansi String Functions
1812 //
1813 NTSYSAPI
1814 VOID
1815 NTAPI
1816 RtlFreeAnsiString(IN PANSI_STRING AnsiString);
1817
1818 NTSYSAPI
1819 VOID
1820 NTAPI
1821 RtlInitAnsiString(
1822 PANSI_STRING DestinationString,
1823 PCSZ SourceString
1824 );
1825
1826 NTSYSAPI
1827 NTSTATUS
1828 NTAPI
1829 RtlInitAnsiStringEx(
1830 PANSI_STRING DestinationString,
1831 PCSZ SourceString
1832 );
1833
1834 //
1835 // OEM String Functions
1836 //
1837 NTSYSAPI
1838 VOID
1839 NTAPI
1840 RtlFreeOemString(IN POEM_STRING OemString);
1841
1842 //
1843 // MultiByte->Unicode String Functions
1844 //
1845 NTSYSAPI
1846 NTSTATUS
1847 NTAPI
1848 RtlMultiByteToUnicodeN(
1849 PWCHAR UnicodeString,
1850 ULONG UnicodeSize,
1851 PULONG ResultSize,
1852 PCSTR MbString,
1853 ULONG MbSize
1854 );
1855
1856 NTSYSAPI
1857 NTSTATUS
1858 NTAPI
1859 RtlMultiByteToUnicodeSize(
1860 PULONG UnicodeSize,
1861 PCSTR MbString,
1862 ULONG MbSize
1863 );
1864
1865 //
1866 // Atom Functions
1867 //
1868 NTSYSAPI
1869 NTSTATUS
1870 NTAPI
1871 RtlAddAtomToAtomTable(
1872 IN PRTL_ATOM_TABLE AtomTable,
1873 IN PWSTR AtomName,
1874 OUT PRTL_ATOM Atom
1875 );
1876
1877 NTSYSAPI
1878 NTSTATUS
1879 NTAPI
1880 RtlCreateAtomTable(
1881 IN ULONG TableSize,
1882 IN OUT PRTL_ATOM_TABLE *AtomTable
1883 );
1884
1885 NTSYSAPI
1886 NTSTATUS
1887 NTAPI
1888 RtlDeleteAtomFromAtomTable(
1889 IN PRTL_ATOM_TABLE AtomTable,
1890 IN RTL_ATOM Atom
1891 );
1892
1893 NTSYSAPI
1894 NTSTATUS
1895 NTAPI
1896 RtlDestroyAtomTable(IN PRTL_ATOM_TABLE AtomTable);
1897
1898 NTSYSAPI
1899 NTSTATUS
1900 NTAPI
1901 RtlQueryAtomInAtomTable(
1902 IN PRTL_ATOM_TABLE AtomTable,
1903 IN RTL_ATOM Atom,
1904 IN OUT PULONG RefCount OPTIONAL,
1905 IN OUT PULONG PinCount OPTIONAL,
1906 IN OUT PWSTR AtomName OPTIONAL,
1907 IN OUT PULONG NameLength OPTIONAL
1908 );
1909
1910 NTSYSAPI
1911 NTSTATUS
1912 NTAPI
1913 RtlPinAtomInAtomTable(
1914 IN PRTL_ATOM_TABLE AtomTable,
1915 IN RTL_ATOM Atom
1916 );
1917
1918 NTSYSAPI
1919 NTSTATUS
1920 NTAPI
1921 RtlLookupAtomInAtomTable(
1922 IN PRTL_ATOM_TABLE AtomTable,
1923 IN PWSTR AtomName,
1924 OUT PRTL_ATOM Atom
1925 );
1926
1927 //
1928 // Process Management Functions
1929 //
1930 NTSYSAPI
1931 PPEB
1932 NTAPI
1933 RtlGetCurrentPeb(
1934 VOID
1935 );
1936
1937 NTSYSAPI
1938 VOID
1939 NTAPI
1940 RtlAcquirePebLock(VOID);
1941
1942 NTSYSAPI
1943 NTSTATUS
1944 NTAPI
1945 RtlCreateProcessParameters (
1946 OUT PRTL_USER_PROCESS_PARAMETERS *ProcessParameters,
1947 IN PUNICODE_STRING ImagePathName OPTIONAL,
1948 IN PUNICODE_STRING DllPath OPTIONAL,
1949 IN PUNICODE_STRING CurrentDirectory OPTIONAL,
1950 IN PUNICODE_STRING CommandLine OPTIONAL,
1951 IN PWSTR Environment OPTIONAL,
1952 IN PUNICODE_STRING WindowTitle OPTIONAL,
1953 IN PUNICODE_STRING DesktopInfo OPTIONAL,
1954 IN PUNICODE_STRING ShellInfo OPTIONAL,
1955 IN PUNICODE_STRING RuntimeInfo OPTIONAL
1956 );
1957
1958 NTSYSAPI
1959 NTSTATUS
1960 NTAPI
1961 RtlCreateUserProcess(
1962 IN PUNICODE_STRING ImageFileName,
1963 IN ULONG Attributes,
1964 IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters,
1965 IN PSECURITY_DESCRIPTOR ProcessSecutityDescriptor OPTIONAL,
1966 IN PSECURITY_DESCRIPTOR ThreadSecurityDescriptor OPTIONAL,
1967 IN HANDLE ParentProcess OPTIONAL,
1968 IN BOOLEAN CurrentDirectory,
1969 IN HANDLE DebugPort OPTIONAL,
1970 IN HANDLE ExceptionPort OPTIONAL,
1971 OUT PRTL_USER_PROCESS_INFORMATION ProcessInfo
1972 );
1973
1974 NTSYSAPI
1975 NTSTATUS
1976 NTAPI
1977 RtlCreateUserThread(
1978 IN HANDLE ProcessHandle,
1979 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
1980 IN BOOLEAN CreateSuspended,
1981 IN ULONG StackZeroBits,
1982 IN SIZE_T StackReserve,
1983 IN SIZE_T StackCommit,
1984 IN PTHREAD_START_ROUTINE StartAddress,
1985 IN PVOID Parameter,
1986 IN OUT PHANDLE ThreadHandle,
1987 IN OUT PCLIENT_ID ClientId
1988 );
1989
1990 NTSYSAPI
1991 PRTL_USER_PROCESS_PARAMETERS
1992 NTAPI
1993 RtlDeNormalizeProcessParams(IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters);
1994
1995 NTSYSAPI
1996 NTSTATUS
1997 NTAPI
1998 RtlDestroyProcessParameters(IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters);
1999
2000 NTSYSAPI
2001 VOID
2002 NTAPI
2003 RtlExitUserThread(NTSTATUS Status);
2004
2005 NTSYSAPI
2006 VOID
2007 NTAPI
2008 RtlInitializeContext(
2009 IN HANDLE ProcessHandle,
2010 OUT PCONTEXT ThreadContext,
2011 IN PVOID ThreadStartParam OPTIONAL,
2012 IN PTHREAD_START_ROUTINE ThreadStartAddress,
2013 IN PINITIAL_TEB InitialTeb
2014 );
2015
2016 NTSYSAPI
2017 BOOLEAN
2018 NTAPI
2019 RtlIsThreadWithinLoaderCallout(VOID);
2020
2021 NTSYSAPI
2022 PRTL_USER_PROCESS_PARAMETERS
2023 NTAPI
2024 RtlNormalizeProcessParams(IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters);
2025
2026 NTSYSAPI
2027 VOID
2028 NTAPI
2029 RtlReleasePebLock(VOID);
2030
2031 NTSYSAPI
2032 NTSTATUS
2033 NTAPI
2034 RtlRemoteCall(
2035 IN HANDLE Process,
2036 IN HANDLE Thread,
2037 IN PVOID CallSite,
2038 IN ULONG ArgumentCount,
2039 IN PULONG Arguments,
2040 IN BOOLEAN PassContext,
2041 IN BOOLEAN AlreadySuspended
2042 );
2043
2044 NTSYSAPI
2045 NTSTATUS
2046 NTAPI
2047 RtlSetProcessIsCritical(
2048 IN BOOLEAN NewValue,
2049 OUT PBOOLEAN OldValue OPTIONAL,
2050 IN BOOLEAN NeedBreaks
2051 );
2052
2053 NTSYSAPI
2054 ULONG
2055 NTAPI
2056 RtlGetCurrentProcessorNumber(
2057 VOID
2058 );
2059
2060 #define NtCurrentPeb() (NtCurrentTeb()->ProcessEnvironmentBlock)
2061
2062 //
2063 // Thread Pool Functions
2064 //
2065 NTSYSAPI
2066 NTSTATUS
2067 NTAPI
2068 RtlDeregisterWaitEx(
2069 IN HANDLE hWaitHandle,
2070 IN HANDLE hCompletionEvent
2071 );
2072
2073 NTSYSAPI
2074 NTSTATUS
2075 NTAPI
2076 RtlDeregisterWait(
2077 IN HANDLE hWaitHandle
2078 );
2079
2080 NTSYSAPI
2081 NTSTATUS
2082 NTAPI
2083 RtlQueueWorkItem(
2084 IN WORKERCALLBACKFUNC Function,
2085 IN PVOID Context OPTIONAL,
2086 IN ULONG Flags
2087 );
2088
2089 NTSYSAPI
2090 NTSTATUS
2091 NTAPI
2092 RtlSetIoCompletionCallback(
2093 IN HANDLE FileHandle,
2094 IN PIO_APC_ROUTINE Callback,
2095 IN ULONG Flags
2096 );
2097
2098 NTSYSAPI
2099 NTSTATUS
2100 NTAPI
2101 RtlRegisterWait(
2102 IN PHANDLE phNewWaitObject,
2103 IN HANDLE hObject,
2104 IN WAITORTIMERCALLBACKFUNC Callback,
2105 IN PVOID pvContext,
2106 IN ULONG ulMilliseconds,
2107 IN ULONG ulFlags
2108 );
2109
2110 //
2111 // Environment/Path Functions
2112 //
2113 NTSYSAPI
2114 NTSTATUS
2115 NTAPI
2116 RtlCreateEnvironment(
2117 BOOLEAN Inherit,
2118 PWSTR *Environment
2119 );
2120
2121 NTSYSAPI
2122 NTSTATUS
2123 NTAPI
2124 RtlComputePrivatizedDllName_U(
2125 IN PUNICODE_STRING DllName,
2126 OUT PUNICODE_STRING RealName,
2127 OUT PUNICODE_STRING LocalName
2128 );
2129
2130 NTSYSAPI
2131 VOID
2132 NTAPI
2133 RtlDestroyEnvironment(
2134 IN PWSTR Environment
2135 );
2136
2137 NTSYSAPI
2138 BOOLEAN
2139 NTAPI
2140 RtlDoesFileExists_U(
2141 IN PCWSTR FileName
2142 );
2143
2144 NTSYSAPI
2145 BOOLEAN
2146 NTAPI
2147 RtlDoesFileExists_UstrEx(
2148 IN PCUNICODE_STRING FileName,
2149 IN BOOLEAN SucceedIfBusy
2150 );
2151
2152 NTSYSAPI
2153 ULONG
2154 NTAPI
2155 RtlDetermineDosPathNameType_U(
2156 IN PCWSTR Path
2157 );
2158
2159 NTSYSAPI
2160 ULONG
2161 NTAPI
2162 RtlDetermineDosPathNameType_Ustr(
2163 IN PCUNICODE_STRING Path
2164 );
2165
2166 NTSYSAPI
2167 ULONG
2168 NTAPI
2169 RtlDosSearchPath_U(
2170 IN PCWSTR Path,
2171 IN PCWSTR FileName,
2172 IN PCWSTR Extension,
2173 IN ULONG BufferSize,
2174 OUT PWSTR Buffer,
2175 OUT PWSTR *PartName
2176 );
2177
2178 NTSYSAPI
2179 BOOLEAN
2180 NTAPI
2181 RtlDosPathNameToNtPathName_U(
2182 IN PCWSTR DosPathName,
2183 OUT PUNICODE_STRING NtPathName,
2184 OUT PCWSTR *NtFileNamePart,
2185 OUT CURDIR *DirectoryInfo
2186 );
2187
2188 NTSYSAPI
2189 NTSTATUS
2190 NTAPI
2191 RtlExpandEnvironmentStrings_U(
2192 PWSTR Environment,
2193 PUNICODE_STRING Source,
2194 PUNICODE_STRING Destination,
2195 PULONG Length
2196 );
2197
2198 NTSYSAPI
2199 ULONG
2200 NTAPI
2201 RtlGetCurrentDirectory_U(
2202 ULONG MaximumLength,
2203 PWSTR Buffer
2204 );
2205
2206 NTSYSAPI
2207 ULONG
2208 NTAPI
2209 RtlGetFullPathName_U(
2210 IN PCWSTR FileName,
2211 IN ULONG Size,
2212 IN PWSTR Buffer,
2213 OUT PWSTR *ShortName
2214 );
2215
2216 NTSYSAPI
2217 ULONG
2218 NTAPI
2219 RtlGetFullPathName_Ustr(
2220 IN PUNICODE_STRING FileName,
2221 IN ULONG Size,
2222 IN PWSTR Buffer,
2223 OUT PWSTR *ShortName,
2224 OUT PBOOLEAN InvalidName,
2225 OUT RTL_PATH_TYPE *PathType
2226 );
2227
2228 NTSYSAPI
2229 ULONG
2230 NTAPI
2231 RtlIsDosDeviceName_U(
2232 IN PWSTR Name
2233 );
2234
2235 NTSYSAPI
2236 ULONG
2237 NTAPI
2238 RtlIsDosDeviceName_Ustr(
2239 IN PUNICODE_STRING Name
2240 );
2241
2242
2243 NTSYSAPI
2244 BOOLEAN
2245 NTAPI
2246 RtlIsNameLegalDOS8Dot3(
2247 IN PCUNICODE_STRING Name,
2248 IN OUT POEM_STRING OemName OPTIONAL,
2249 IN OUT PBOOLEAN NameContainsSpaces OPTIONAL
2250 );
2251
2252 NTSYSAPI
2253 NTSTATUS
2254 NTAPI
2255 RtlQueryEnvironmentVariable_U(
2256 PWSTR Environment,
2257 PUNICODE_STRING Name,
2258 PUNICODE_STRING Value
2259 );
2260
2261 NTSYSAPI
2262 NTSTATUS
2263 NTAPI
2264 RtlSetCurrentDirectory_U(
2265 IN PUNICODE_STRING name
2266 );
2267
2268 NTSYSAPI
2269 NTSTATUS
2270 NTAPI
2271 RtlSetEnvironmentVariable(
2272 PWSTR *Environment,
2273 PUNICODE_STRING Name,
2274 PUNICODE_STRING Value
2275 );
2276
2277 //
2278 // Critical Section/Resource Functions
2279 //
2280 NTSYSAPI
2281 NTSTATUS
2282 NTAPI
2283 RtlDeleteCriticalSection (
2284 IN PRTL_CRITICAL_SECTION CriticalSection
2285 );
2286
2287 NTSYSAPI
2288 NTSTATUS
2289 NTAPI
2290 RtlEnterCriticalSection(
2291 IN PRTL_CRITICAL_SECTION CriticalSection
2292 );
2293
2294 NTSYSAPI
2295 NTSTATUS
2296 NTAPI
2297 RtlInitializeCriticalSection(
2298 IN PRTL_CRITICAL_SECTION CriticalSection
2299 );
2300
2301 NTSYSAPI
2302 NTSTATUS
2303 NTAPI
2304 RtlInitializeCriticalSectionAndSpinCount(
2305 IN PRTL_CRITICAL_SECTION CriticalSection,
2306 IN ULONG SpinCount
2307 );
2308
2309 NTSYSAPI
2310 NTSTATUS
2311 NTAPI
2312 RtlLeaveCriticalSection(
2313 IN PRTL_CRITICAL_SECTION CriticalSection
2314 );
2315
2316 NTSYSAPI
2317 BOOLEAN
2318 NTAPI
2319 RtlTryEnterCriticalSection(
2320 IN PRTL_CRITICAL_SECTION CriticalSection
2321 );
2322
2323 NTSYSAPI
2324 VOID
2325 NTAPI
2326 RtlpUnWaitCriticalSection(
2327 IN PRTL_CRITICAL_SECTION CriticalSection
2328 );
2329
2330 NTSYSAPI
2331 NTSTATUS
2332 NTAPI
2333 RtlpWaitForCriticalSection(
2334 IN PRTL_CRITICAL_SECTION CriticalSection
2335 );
2336
2337 NTSYSAPI
2338 BOOLEAN
2339 NTAPI
2340 RtlAcquireResourceExclusive(
2341 IN PRTL_RESOURCE Resource,
2342 IN BOOLEAN Wait
2343 );
2344
2345 NTSYSAPI
2346 BOOLEAN
2347 NTAPI
2348 RtlAcquireResourceShared(
2349 IN PRTL_RESOURCE Resource,
2350 IN BOOLEAN Wait
2351 );
2352
2353 NTSYSAPI
2354 VOID
2355 NTAPI
2356 RtlConvertExclusiveToShared(
2357 IN PRTL_RESOURCE Resource
2358 );
2359
2360 NTSYSAPI
2361 VOID
2362 NTAPI
2363 RtlConvertSharedToExclusive(
2364 IN PRTL_RESOURCE Resource
2365 );
2366
2367 NTSYSAPI
2368 VOID
2369 NTAPI
2370 RtlDeleteResource(
2371 IN PRTL_RESOURCE Resource
2372 );
2373
2374 NTSYSAPI
2375 VOID
2376 NTAPI
2377 RtlDumpResource(
2378 IN PRTL_RESOURCE Resource
2379 );
2380
2381 NTSYSAPI
2382 VOID
2383 NTAPI
2384 RtlInitializeResource(
2385 IN PRTL_RESOURCE Resource
2386 );
2387
2388 NTSYSAPI
2389 VOID
2390 NTAPI
2391 RtlReleaseResource(
2392 IN PRTL_RESOURCE Resource
2393 );
2394
2395 //
2396 // Compression Functions
2397 //
2398 NTSYSAPI
2399 NTSTATUS
2400 NTAPI
2401 RtlCompressBuffer(
2402 IN USHORT CompressionFormatAndEngine,
2403 IN PUCHAR UncompressedBuffer,
2404 IN ULONG UncompressedBufferSize,
2405 OUT PUCHAR CompressedBuffer,
2406 IN ULONG CompressedBufferSize,
2407 IN ULONG UncompressedChunkSize,
2408 OUT PULONG FinalCompressedSize,
2409 IN PVOID WorkSpace
2410 );
2411
2412 NTSYSAPI
2413 NTSTATUS
2414 NTAPI
2415 RtlDecompressBuffer(
2416 IN USHORT CompressionFormat,
2417 OUT PUCHAR UncompressedBuffer,
2418 IN ULONG UncompressedBufferSize,
2419 IN PUCHAR CompressedBuffer,
2420 IN ULONG CompressedBufferSize,
2421 OUT PULONG FinalUncompressedSize
2422 );
2423
2424 NTSYSAPI
2425 NTSTATUS
2426 NTAPI
2427 RtlGetCompressionWorkSpaceSize(
2428 IN USHORT CompressionFormatAndEngine,
2429 OUT PULONG CompressBufferWorkSpaceSize,
2430 OUT PULONG CompressFragmentWorkSpaceSize
2431 );
2432
2433 //
2434 // Debug Info Functions
2435 //
2436 NTSYSAPI
2437 PRTL_DEBUG_INFORMATION
2438 NTAPI
2439 RtlCreateQueryDebugBuffer(
2440 IN ULONG Size,
2441 IN BOOLEAN EventPair
2442 );
2443
2444 NTSYSAPI
2445 NTSTATUS
2446 NTAPI
2447 RtlDestroyQueryDebugBuffer(IN PRTL_DEBUG_INFORMATION DebugBuffer);
2448
2449 NTSYSAPI
2450 NTSTATUS
2451 NTAPI
2452 RtlQueryProcessDebugInformation(
2453 IN ULONG ProcessId,
2454 IN ULONG DebugInfoClassMask,
2455 IN OUT PRTL_DEBUG_INFORMATION DebugBuffer
2456 );
2457
2458 //
2459 // Bitmap Functions
2460 //
2461 NTSYSAPI
2462 BOOLEAN
2463 NTAPI
2464 RtlAreBitsClear(
2465 IN PRTL_BITMAP BitMapHeader,
2466 IN ULONG StartingIndex,
2467 IN ULONG Length
2468 );
2469
2470 NTSYSAPI
2471 BOOLEAN
2472 NTAPI
2473 RtlAreBitsSet(
2474 IN PRTL_BITMAP BitMapHeader,
2475 IN ULONG StartingIndex,
2476 IN ULONG Length
2477 );
2478
2479 NTSYSAPI
2480 VOID
2481 NTAPI
2482 RtlClearBits(
2483 IN PRTL_BITMAP BitMapHeader,
2484 IN ULONG StartingIndex,
2485 IN ULONG NumberToClear
2486 );
2487
2488 NTSYSAPI
2489 ULONG
2490 NTAPI
2491 RtlFindClearBits(
2492 IN PRTL_BITMAP BitMapHeader,
2493 IN ULONG NumberToFind,
2494 IN ULONG HintIndex
2495 );
2496
2497 NTSYSAPI
2498 ULONG
2499 NTAPI
2500 RtlFindClearBitsAndSet(
2501 IN PRTL_BITMAP BitMapHeader,
2502 IN ULONG NumberToFind,
2503 IN ULONG HintIndex
2504 );
2505
2506 NTSYSAPI
2507 ULONG
2508 NTAPI
2509 RtlFindNextForwardRunClear(
2510 IN PRTL_BITMAP BitMapHeader,
2511 IN ULONG FromIndex,
2512 IN PULONG StartingRunIndex
2513 );
2514
2515 NTSYSAPI
2516 VOID
2517 NTAPI
2518 RtlInitializeBitMap(
2519 IN PRTL_BITMAP BitMapHeader,
2520 IN PULONG BitMapBuffer,
2521 IN ULONG SizeOfBitMap
2522 );
2523
2524 NTSYSAPI
2525 ULONG
2526 NTAPI
2527 RtlNumberOfSetBits(
2528 IN PRTL_BITMAP BitMapHeader
2529 );
2530
2531 NTSYSAPI
2532 VOID
2533 NTAPI
2534 RtlSetBit(
2535 PRTL_BITMAP BitMapHeader,
2536 ULONG BitNumber
2537 );
2538
2539 NTSYSAPI
2540 VOID
2541 NTAPI
2542 RtlSetBits(
2543 IN PRTL_BITMAP BitMapHeader,
2544 IN ULONG StartingIndex,
2545 IN ULONG NumberToSet
2546 );
2547
2548 NTSYSAPI
2549 VOID
2550 NTAPI
2551 RtlSetAllBits(
2552 PRTL_BITMAP BitMapHeader
2553 );
2554
2555 NTSYSAPI
2556 BOOLEAN
2557 NTAPI
2558 RtlTestBit(
2559 PRTL_BITMAP BitMapHeader,
2560 ULONG BitNumber
2561 );
2562
2563 //
2564 // Timer Functions
2565 //
2566 NTSYSAPI
2567 NTSTATUS
2568 NTAPI
2569 RtlCreateTimer(
2570 HANDLE TimerQueue,
2571 PHANDLE phNewTimer,
2572 WAITORTIMERCALLBACKFUNC Callback,
2573 PVOID Parameter,
2574 ULONG DueTime,
2575 ULONG Period,
2576 ULONG Flags
2577 );
2578
2579 NTSYSAPI
2580 NTSTATUS
2581 NTAPI
2582 RtlCreateTimerQueue(PHANDLE TimerQueue);
2583
2584 NTSYSAPI
2585 NTSTATUS
2586 NTAPI
2587 RtlDeleteTimer(
2588 HANDLE TimerQueue,
2589 HANDLE Timer,
2590 HANDLE CompletionEvent
2591 );
2592
2593 NTSYSAPI
2594 NTSTATUS
2595 NTAPI
2596 RtlUpdateTimer(
2597 HANDLE TimerQueue,
2598 HANDLE Timer,
2599 ULONG DueTime,
2600 ULONG Period
2601 );
2602
2603 NTSYSAPI
2604 NTSTATUS
2605 NTAPI
2606 RtlDeleteTimerQueueEx(
2607 HANDLE TimerQueue,
2608 HANDLE CompletionEvent
2609 );
2610
2611 NTSYSAPI
2612 NTSTATUS
2613 NTAPI
2614 RtlDeleteTimerQueue(HANDLE TimerQueue);
2615
2616 //
2617 // SList functions
2618 //
2619 PSLIST_ENTRY
2620 FASTCALL
2621 InterlockedPushListSList(
2622 IN PSLIST_HEADER ListHead,
2623 IN PSLIST_ENTRY List,
2624 IN PSLIST_ENTRY ListEnd,
2625 IN ULONG Count
2626 );
2627
2628 //
2629 // Range List functions
2630 //
2631 NTSYSAPI
2632 VOID
2633 NTAPI
2634 RtlFreeRangeList(IN PRTL_RANGE_LIST RangeList);
2635
2636 //
2637 // Debug Functions
2638 //
2639 ULONG
2640 __cdecl
2641 DbgPrint(
2642 IN PCCH Format,
2643 IN ...
2644 );
2645
2646 NTSYSAPI
2647 ULONG
2648 __cdecl
2649 DbgPrintEx(
2650 IN ULONG ComponentId,
2651 IN ULONG Level,
2652 IN PCCH Format,
2653 IN ...
2654 );
2655
2656 NTSYSAPI
2657 ULONG
2658 NTAPI
2659 DbgPrompt(
2660 IN PCCH Prompt,
2661 OUT PCH Response,
2662 IN ULONG MaximumResponseLength
2663 );
2664
2665 VOID
2666 NTAPI
2667 DbgBreakPoint(
2668 VOID
2669 );
2670
2671 VOID
2672 NTAPI
2673 DbgLoadImageSymbols(
2674 IN PSTRING Name,
2675 IN PVOID Base,
2676 IN ULONG_PTR ProcessId
2677 );
2678
2679 VOID
2680 NTAPI
2681 DbgUnLoadImageSymbols(
2682 IN PSTRING Name,
2683 IN PVOID Base,
2684 IN ULONG_PTR ProcessId
2685 );
2686
2687 VOID
2688 NTAPI
2689 DbgCommandString(
2690 IN PCCH Name,
2691 IN PCCH Command
2692 );
2693
2694 //
2695 // Generic Table Functions
2696 //
2697 #if defined(NTOS_MODE_USER) || defined(_NTIFS_)
2698 NTSYSAPI
2699 PVOID
2700 NTAPI
2701 RtlInsertElementGenericTable(
2702 IN PRTL_GENERIC_TABLE Table,
2703 IN PVOID Buffer,
2704 IN ULONG BufferSize,
2705 OUT PBOOLEAN NewElement OPTIONAL
2706 );
2707
2708 NTSYSAPI
2709 PVOID
2710 NTAPI
2711 RtlInsertElementGenericTableFull(
2712 IN PRTL_GENERIC_TABLE Table,
2713 IN PVOID Buffer,
2714 IN ULONG BufferSize,
2715 OUT PBOOLEAN NewElement OPTIONAL,
2716 IN PVOID NodeOrParent,
2717 IN TABLE_SEARCH_RESULT SearchResult
2718 );
2719
2720 NTSYSAPI
2721 BOOLEAN
2722 NTAPI
2723 RtlIsGenericTableEmpty(
2724 IN PRTL_GENERIC_TABLE Table
2725 );
2726
2727 NTSYSAPI
2728 PVOID
2729 NTAPI
2730 RtlLookupElementGenericTableFull(
2731 IN PRTL_GENERIC_TABLE Table,
2732 IN PVOID Buffer,
2733 OUT PVOID *NodeOrParent,
2734 OUT TABLE_SEARCH_RESULT *SearchResult
2735 );
2736 #endif
2737
2738 //
2739 // Handle Table Functions
2740 //
2741 NTSYSAPI
2742 PRTL_HANDLE_TABLE_ENTRY
2743 NTAPI
2744 RtlAllocateHandle(
2745 IN PRTL_HANDLE_TABLE HandleTable,
2746 IN OUT PULONG Index
2747 );
2748
2749 NTSYSAPI
2750 VOID
2751 NTAPI
2752 RtlDestroyHandleTable(IN PRTL_HANDLE_TABLE HandleTable);
2753
2754 NTSYSAPI
2755 BOOLEAN
2756 NTAPI
2757 RtlFreeHandle(
2758 IN PRTL_HANDLE_TABLE HandleTable,
2759 IN PRTL_HANDLE_TABLE_ENTRY Handle
2760 );
2761
2762 NTSYSAPI
2763 VOID
2764 NTAPI
2765 RtlInitializeHandleTable(
2766 IN ULONG TableSize,
2767 IN ULONG HandleSize,
2768 IN PRTL_HANDLE_TABLE HandleTable
2769 );
2770
2771 NTSYSAPI
2772 BOOLEAN
2773 NTAPI
2774 RtlIsValidHandle(
2775 IN PRTL_HANDLE_TABLE HandleTable,
2776 IN PRTL_HANDLE_TABLE_ENTRY Handle
2777 );
2778
2779 NTSYSAPI
2780 BOOLEAN
2781 NTAPI
2782 RtlIsValidIndexHandle(
2783 IN PRTL_HANDLE_TABLE HandleTable,
2784 IN ULONG Index,
2785 OUT PRTL_HANDLE_TABLE_ENTRY *Handle
2786 );
2787
2788 //
2789 // PE Functions
2790 //
2791 NTSYSAPI
2792 NTSTATUS
2793 NTAPI
2794 RtlFindMessage(
2795 IN PVOID BaseAddress,
2796 IN ULONG Type,
2797 IN ULONG Language,
2798 IN ULONG MessageId,
2799 OUT PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry
2800 );
2801
2802 NTSYSAPI
2803 ULONG
2804 NTAPI
2805 RtlGetNtGlobalFlags(VOID);
2806
2807 NTSYSAPI
2808 PVOID
2809 NTAPI
2810 RtlImageDirectoryEntryToData(
2811 PVOID BaseAddress,
2812 BOOLEAN MappedAsImage,
2813 USHORT Directory,
2814 PULONG Size
2815 );
2816
2817 NTSYSAPI
2818 PVOID
2819 NTAPI
2820 RtlImageRvaToVa(
2821 PIMAGE_NT_HEADERS NtHeader,
2822 PVOID BaseAddress,
2823 ULONG Rva,
2824 PIMAGE_SECTION_HEADER *SectionHeader
2825 );
2826
2827 NTSYSAPI
2828 PIMAGE_NT_HEADERS
2829 NTAPI
2830 RtlImageNtHeader(IN PVOID BaseAddress);
2831
2832 NTSYSAPI
2833 NTSTATUS
2834 NTAPI
2835 RtlImageNtHeaderEx(
2836 IN ULONG Flags,
2837 IN PVOID BaseAddress,
2838 IN ULONGLONG Size,
2839 IN PIMAGE_NT_HEADERS *NtHeader
2840 );
2841
2842 NTSYSAPI
2843 PIMAGE_SECTION_HEADER
2844 NTAPI
2845 RtlImageRvaToSection(
2846 PIMAGE_NT_HEADERS NtHeader,
2847 PVOID BaseAddress,
2848 ULONG Rva
2849 );
2850
2851 NTSYSAPI
2852 ULONG
2853 NTAPI
2854 LdrRelocateImageWithBias(
2855 IN PVOID NewAddress,
2856 IN LONGLONG AdditionalBias,
2857 IN PCCH LoaderName,
2858 IN ULONG Success,
2859 IN ULONG Conflict,
2860 IN ULONG Invalid
2861 );
2862
2863 //
2864 // Activation Context Functions
2865 //
2866 #ifdef NTOS_MODE_USER
2867
2868 NTSYSAPI
2869 NTSTATUS
2870 NTAPI
2871 RtlActivateActivationContext(
2872 IN ULONG Unknown,
2873 IN HANDLE Handle,
2874 OUT PULONG_PTR Cookie
2875 );
2876
2877 NTSYSAPI
2878 VOID
2879 NTAPI
2880 RtlAddRefActivationContext(
2881 PVOID Context
2882 );
2883
2884
2885 NTSYSAPI
2886 NTSTATUS
2887 NTAPI
2888 RtlActivateActivationContextUnsafeFast(
2889 IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame,
2890 IN PVOID Context
2891 );
2892
2893 NTSYSAPI
2894 NTSTATUS
2895 NTAPI
2896 RtlAllocateActivationContextStack(
2897 IN PVOID *Context
2898 );
2899
2900 NTSYSAPI
2901 NTSTATUS
2902 NTAPI
2903 RtlCreateActivationContext(
2904 OUT PHANDLE Handle,
2905 IN OUT PVOID ReturnedData
2906 );
2907
2908 NTSYSAPI
2909 NTSTATUS
2910 NTAPI
2911 RtlGetActiveActivationContext(
2912 IN PVOID *Context
2913 );
2914
2915 NTSYSAPI
2916 VOID
2917 NTAPI
2918 RtlReleaseActivationContext(
2919 IN HANDLE handle
2920 );
2921
2922 NTSYSAPI
2923 NTSTATUS
2924 NTAPI
2925 RtlDeactivateActivationContext(
2926 ULONG dwFlags,
2927 ULONG_PTR ulCookie
2928 );
2929
2930 NTSYSAPI
2931 VOID
2932 NTAPI
2933 RtlFreeThreadActivationContextStack(void);
2934
2935 NTSYSAPI
2936 NTSTATUS
2937 NTAPI
2938 RtlDeactivateActivationContextUnsafeFast(
2939 IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame
2940 );
2941
2942 NTSYSAPI
2943 NTSTATUS
2944 NTAPI
2945 RtlDosApplyFileIsolationRedirection_Ustr(
2946 IN BOOLEAN Unknown,
2947 IN PUNICODE_STRING OriginalName,
2948 IN PUNICODE_STRING Extension,
2949 IN OUT PUNICODE_STRING RedirectedName,
2950 IN OUT PUNICODE_STRING RedirectedName2,
2951 IN OUT PUNICODE_STRING *OriginalName2,
2952 IN PVOID Unknown1,
2953 IN PVOID Unknown2,
2954 IN PVOID Unknown3
2955 );
2956
2957 NTSYSAPI
2958 NTSTATUS
2959 NTAPI
2960 RtlFindActivationContextSectionString(
2961 IN ULONG dwFlags,
2962 IN const GUID *ExtensionGuid,
2963 IN ULONG SectionType,
2964 IN PUNICODE_STRING SectionName,
2965 IN OUT PVOID ReturnedData
2966 );
2967
2968 NTSYSAPI
2969 NTSTATUS
2970 NTAPI
2971 RtlQueryInformationActivationContext(
2972 DWORD dwFlags,
2973 PVOID Context,
2974 PVOID pvSubInstance,
2975 ULONG ulInfoClass,
2976 PVOID pvBuffer,
2977 SIZE_T cbBuffer OPTIONAL,
2978 SIZE_T *pcbWrittenOrRequired OPTIONAL
2979 );
2980
2981 NTSYSAPI
2982 NTSTATUS
2983 NTAPI
2984 RtlZombifyActivationContext(
2985 PVOID Context
2986 );
2987
2988
2989 #endif
2990
2991 //
2992 // Registry Functions
2993 //
2994 NTSYSAPI
2995 NTSTATUS
2996 NTAPI
2997 RtlCheckRegistryKey(
2998 ULONG RelativeTo,
2999 PWSTR Path
3000 );
3001
3002 NTSYSAPI
3003 NTSTATUS
3004 NTAPI
3005 RtlCreateRegistryKey(
3006 IN ULONG RelativeTo,
3007 IN PWSTR Path
3008 );
3009
3010 NTSYSAPI
3011 NTSTATUS
3012 NTAPI
3013 RtlFormatCurrentUserKeyPath(
3014 IN OUT PUNICODE_STRING KeyPath
3015 );
3016
3017 NTSYSAPI
3018 NTSTATUS
3019 NTAPI
3020 RtlpNtOpenKey(
3021 OUT HANDLE KeyHandle,
3022 IN ACCESS_MASK DesiredAccess,
3023 IN POBJECT_ATTRIBUTES ObjectAttributes,
3024 IN ULONG Unused
3025 );
3026
3027 NTSYSAPI
3028 NTSTATUS
3029 NTAPI
3030 RtlOpenCurrentUser(
3031 IN ACCESS_MASK DesiredAccess,
3032 OUT PHANDLE KeyHandle
3033 );
3034
3035 NTSYSAPI
3036 NTSTATUS
3037 NTAPI
3038 RtlQueryRegistryValues(
3039 IN ULONG RelativeTo,
3040 IN PCWSTR Path,
3041 IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
3042 IN PVOID Context,
3043 IN PVOID Environment
3044 );
3045
3046 NTSYSAPI
3047 NTSTATUS
3048 NTAPI
3049 RtlWriteRegistryValue(
3050 ULONG RelativeTo,
3051 PCWSTR Path,
3052 PCWSTR ValueName,
3053 ULONG ValueType,
3054 PVOID ValueData,
3055 ULONG ValueLength
3056 );
3057
3058 //
3059 // NLS Functions
3060 //
3061 NTSYSAPI
3062 VOID
3063 NTAPI
3064 RtlGetDefaultCodePage(
3065 OUT PUSHORT AnsiCodePage,
3066 OUT PUSHORT OemCodePage
3067 );
3068
3069 NTSYSAPI
3070 VOID
3071 NTAPI
3072 RtlInitNlsTables(
3073 IN PUSHORT AnsiTableBase,
3074 IN PUSHORT OemTableBase,
3075 IN PUSHORT CaseTableBase,
3076 OUT PNLSTABLEINFO NlsTable
3077 );
3078
3079 NTSYSAPI
3080 VOID
3081 NTAPI
3082 RtlInitCodePageTable(
3083 IN PUSHORT TableBase,
3084 OUT PCPTABLEINFO CodePageTable
3085 );
3086
3087 NTSYSAPI
3088 VOID
3089 NTAPI
3090 RtlResetRtlTranslations(IN PNLSTABLEINFO NlsTable);
3091
3092 #if defined(NTOS_MODE_USER) && !defined(NO_RTL_INLINES)
3093
3094 //
3095 // Misc conversion functions
3096 //
3097 static __inline
3098 LARGE_INTEGER
3099 NTAPI_INLINE
3100 RtlConvertLongToLargeInteger(
3101 LONG SignedInteger
3102 )
3103 {
3104 LARGE_INTEGER Result;
3105
3106 Result.QuadPart = SignedInteger;
3107 return Result;
3108 }
3109
3110 static __inline
3111 LARGE_INTEGER
3112 NTAPI_INLINE
3113 RtlEnlargedIntegerMultiply(
3114 LONG Multiplicand,
3115 LONG Multiplier
3116 )
3117 {
3118 LARGE_INTEGER Product;
3119
3120 Product.QuadPart = (LONGLONG)Multiplicand * (ULONGLONG)Multiplier;
3121 return Product;
3122 }
3123
3124 static __inline
3125 ULONG
3126 NTAPI_INLINE
3127 RtlEnlargedUnsignedDivide(
3128 IN ULARGE_INTEGER Dividend,
3129 IN ULONG Divisor,
3130 IN PULONG Remainder OPTIONAL
3131 )
3132 {
3133 ULONG Quotient;
3134
3135 Quotient = (ULONG)(Dividend.QuadPart / Divisor);
3136 if (Remainder) {
3137 *Remainder = (ULONG)(Dividend.QuadPart % Divisor);
3138 }
3139
3140 return Quotient;
3141 }
3142
3143 static __inline
3144 LARGE_INTEGER
3145 NTAPI_INLINE
3146 RtlEnlargedUnsignedMultiply(
3147 ULONG Multiplicand,
3148 ULONG Multiplier
3149 )
3150 {
3151 LARGE_INTEGER Product;
3152
3153 Product.QuadPart = (ULONGLONG)Multiplicand * (ULONGLONG)Multiplier;
3154 return Product;
3155 }
3156 #endif
3157
3158 NTSYSAPI
3159 ULONG
3160 NTAPI
3161 RtlUniform(
3162 IN PULONG Seed
3163 );
3164
3165 NTSYSAPI
3166 ULONG
3167 NTAPI
3168 RtlRandom(
3169 IN OUT PULONG Seed
3170 );
3171
3172 NTSYSAPI
3173 ULONG
3174 NTAPI
3175 RtlComputeCrc32(
3176 IN USHORT PartialCrc,
3177 IN PUCHAR Buffer,
3178 IN ULONG Length
3179 );
3180
3181 //
3182 // Network Functions
3183 //
3184 NTSYSAPI
3185 NTSTATUS
3186 NTAPI
3187 RtlIpv4StringToAddressW(
3188 IN PCWSTR String,
3189 IN BOOLEAN Strict,
3190 OUT LPWSTR *Terminator,
3191 OUT struct in_addr *Addr
3192 );
3193
3194 NTSYSAPI
3195 NTSTATUS
3196 NTAPI
3197 RtlIpv6StringToAddressA(
3198 IN PCHAR Name,
3199 OUT PCHAR *Terminator,
3200 OUT struct in6_addr *Addr
3201 );
3202
3203 NTSYSAPI
3204 NTSTATUS
3205 NTAPI
3206 RtlIpv6StringToAddressW(
3207 IN PWCHAR Name,
3208 OUT PCHAR *Terminator,
3209 OUT struct in6_addr *Addr
3210 );
3211
3212 NTSYSAPI
3213 NTSTATUS
3214 NTAPI
3215 RtlIpv6StringToAddressExA(
3216 IN PCHAR AddressString,
3217 IN struct in6_addr *Address,
3218 IN PULONG ScopeId,
3219 IN PUSHORT Port
3220 );
3221
3222 NTSYSAPI
3223 NTSTATUS
3224 NTAPI
3225 RtlIpv6StringToAddressExW(
3226 IN PWCHAR AddressName,
3227 IN struct in6_addr *Address,
3228 IN PULONG ScopeId,
3229 IN PUSHORT Port
3230 );
3231
3232
3233 //
3234 // Time Functions
3235 //
3236 NTSYSAPI
3237 NTSTATUS
3238 NTAPI
3239 RtlQueryTimeZoneInformation(PRTL_TIME_ZONE_INFORMATION TimeZoneInformation);
3240
3241 NTSYSAPI
3242 VOID
3243 NTAPI
3244 RtlSecondsSince1970ToTime(
3245 IN ULONG SecondsSince1970,
3246 OUT PLARGE_INTEGER Time
3247 );
3248
3249 NTSYSAPI
3250 NTSTATUS
3251 NTAPI
3252 RtlSetTimeZoneInformation(PRTL_TIME_ZONE_INFORMATION TimeZoneInformation);
3253
3254 NTSYSAPI
3255 BOOLEAN
3256 NTAPI
3257 RtlTimeFieldsToTime(
3258 PTIME_FIELDS TimeFields,
3259 PLARGE_INTEGER Time
3260 );
3261
3262 NTSYSAPI
3263 BOOLEAN
3264 NTAPI
3265 RtlTimeToSecondsSince1970(
3266 PLARGE_INTEGER Time,
3267 OUT PULONG SecondsSince1970
3268 );
3269
3270 NTSYSAPI
3271 VOID
3272 NTAPI
3273 RtlTimeToTimeFields(
3274 PLARGE_INTEGER Time,
3275 PTIME_FIELDS TimeFields
3276 );
3277
3278 NTSYSAPI
3279 NTSTATUS
3280 NTAPI
3281 RtlSystemTimeToLocalTime(
3282 IN PLARGE_INTEGER SystemTime,
3283 OUT PLARGE_INTEGER LocalTime
3284 );
3285
3286 //
3287 // Version Functions
3288 //
3289 NTSYSAPI
3290 NTSTATUS
3291 NTAPI
3292 RtlVerifyVersionInfo(
3293 IN PRTL_OSVERSIONINFOEXW VersionInfo,
3294 IN ULONG TypeMask,
3295 IN ULONGLONG ConditionMask
3296 );
3297
3298 NTSYSAPI
3299 NTSTATUS
3300 NTAPI
3301 RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation);
3302
3303 NTSYSAPI
3304 BOOLEAN
3305 NTAPI
3306 RtlGetNtProductType(OUT PNT_PRODUCT_TYPE ProductType);
3307
3308 //
3309 // Secure Memory Functions
3310 //
3311 #ifdef NTOS_MODE_USER
3312 NTSYSAPI
3313 NTSTATUS
3314 NTAPI
3315 RtlRegisterSecureMemoryCacheCallback(
3316 IN PRTL_SECURE_MEMORY_CACHE_CALLBACK Callback);
3317
3318 NTSYSAPI
3319 BOOLEAN
3320 NTAPI
3321 RtlFlushSecureMemoryCache(
3322 IN PVOID MemoryCache,
3323 IN OPTIONAL SIZE_T MemoryLength
3324 );
3325 #endif
3326
3327 #ifdef __cplusplus
3328 }
3329 #endif
3330
3331 #endif