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