8 #if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined (__NTAPP__)
13 #endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
21 * PURPOSE: Flags for RtlQueryRegistryValues
23 #define RTL_QUERY_REGISTRY_SUBKEY (0x00000001)
24 #define RTL_QUERY_REGISTRY_TOPKEY (0x00000002)
25 #define RTL_QUERY_REGISTRY_REQUIRED (0x00000004)
26 #define RTL_QUERY_REGISTRY_NOVALUE (0x00000008)
27 #define RTL_QUERY_REGISTRY_NOEXPAND (0x00000010)
28 #define RTL_QUERY_REGISTRY_DIRECT (0x00000020)
29 #define RTL_QUERY_REGISTRY_DELETE (0x00000040)
33 * PURPOSE: Flags used by RtlIsTextUnicode and IsTextUnicode
35 #define IS_TEXT_UNICODE_ASCII16 (0x00000001)
36 #define IS_TEXT_UNICODE_REVERSE_ASCII16 (0x00000010)
37 #define IS_TEXT_UNICODE_STATISTICS (0x00000002)
38 #define IS_TEXT_UNICODE_REVERSE_STATISTICS (0x00000020)
39 #define IS_TEXT_UNICODE_CONTROLS (0x00000004)
40 #define IS_TEXT_UNICODE_REVERSE_CONTROLS (0x00000040)
41 #define IS_TEXT_UNICODE_SIGNATURE (0x00000008)
42 #define IS_TEXT_UNICODE_REVERSE_SIGNATURE (0x00000080)
43 #define IS_TEXT_UNICODE_ILLEGAL_CHARS (0x00000100)
44 #define IS_TEXT_UNICODE_ODD_LENGTH (0x00000200)
45 #define IS_TEXT_UNICODE_NULL_BYTES (0x00001000)
46 #define IS_TEXT_UNICODE_UNICODE_MASK (0x0000000F)
47 #define IS_TEXT_UNICODE_REVERSE_MASK (0x000000F0)
48 #define IS_TEXT_UNICODE_NOT_UNICODE_MASK (0x00000F00)
49 #define IS_TEXT_UNICODE_NOT_ASCII_MASK (0x0000F000)
53 * InitializeObjectAttributes (
54 * POBJECT_ATTRIBUTES InitializedAttributes,
55 * PUNICODE_STRING ObjectName,
57 * HANDLE RootDirectory,
58 * PSECURITY_DESCRIPTOR SecurityDescriptor
61 * FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a
62 * subsequent call to ZwCreateXXX or ZwOpenXXX
64 * InitializedAttributes (OUT) = Caller supplied storage for the
66 * ObjectName = Full path name for object
67 * Attributes = Attributes for the object
68 * RootDirectory = Where the object should be placed or NULL
69 * SecurityDescriptor = Ignored
71 #define InitializeObjectAttributes(p,n,a,r,s) \
73 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
74 (p)->ObjectName = n; \
75 (p)->Attributes = a; \
76 (p)->RootDirectory = r; \
77 (p)->SecurityDescriptor = s; \
78 (p)->SecurityQualityOfService = NULL; \
84 * InitializeListHead (
85 * PLIST_ENTRY ListHead
88 * FUNCTION: Initializes a double linked list
90 * ListHead = Caller supplied storage for the head of the list
92 #define InitializeListHead(ListHead) \
94 (ListHead)->Flink = (ListHead); \
95 (ListHead)->Blink = (ListHead); \
102 * PLIST_ENTRY ListHead,
106 * FUNCTION: Inserts an entry in a double linked list
108 * ListHead = Head of the list
109 * Entry = Entry to insert
111 #define InsertHeadList(ListHead, ListEntry) \
113 PLIST_ENTRY OldFlink; \
114 OldFlink = (ListHead)->Flink; \
115 (ListEntry)->Flink = OldFlink; \
116 (ListEntry)->Blink = (ListHead); \
117 OldFlink->Blink = (ListEntry); \
118 (ListHead)->Flink = (ListEntry); \
119 assert((ListEntry) != NULL); \
120 assert((ListEntry)->Blink!=NULL); \
121 assert((ListEntry)->Blink->Flink == (ListEntry)); \
122 assert((ListEntry)->Flink != NULL); \
123 assert((ListEntry)->Flink->Blink == (ListEntry)); \
130 * PLIST_ENTRY ListHead,
135 * Inserts an entry in a double linked list
138 * ListHead = Head of the list
139 * Entry = Entry to insert
141 #define InsertTailList(ListHead, ListEntry) \
143 PLIST_ENTRY OldBlink; \
144 OldBlink = (ListHead)->Blink; \
145 (ListEntry)->Flink = (ListHead); \
146 (ListEntry)->Blink = OldBlink; \
147 OldBlink->Flink = (ListEntry); \
148 (ListHead)->Blink = (ListEntry); \
149 assert((ListEntry) != NULL); \
150 assert((ListEntry)->Blink != NULL); \
151 assert((ListEntry)->Blink->Flink == (ListEntry)); \
152 assert((ListEntry)->Flink != NULL); \
153 assert((ListEntry)->Flink->Blink == (ListEntry)); \
159 * PLIST_ENTRY ListHead
163 * Checks if a double linked list is empty
166 * ListHead = Head of the list
168 #define IsListEmpty(ListHead) \
169 ((ListHead)->Flink == (ListHead))
175 * PSINGLE_LIST_ENTRY ListHead
179 * Removes an entry from the head of a single linked list
182 * ListHead = Head of the list
188 #define PopEntryList(ListHead) \
191 PSINGLE_LIST_ENTRY FirstEntry; \
192 FirstEntry = (ListHead)->Next; \
193 if (FirstEntry != NULL) \
195 (ListHead)->Next = FirstEntry->Next; \
200 static inline PSINGLE_LIST_ENTRY PopEntryList(PSINGLE_LIST_ENTRY ListHead) G_GNUC_UNUSED;
201 #endif /* G_GNUC_UNUSED */
202 static inline PSINGLE_LIST_ENTRY
203 PopEntryList(PSINGLE_LIST_ENTRY ListHead)
205 PSINGLE_LIST_ENTRY ListEntry;
207 ListEntry = ListHead->Next;
210 ListHead->Next = ListEntry->Next;
216 #define RtlCopyMemory(Destination,Source,Length) \
217 memcpy((Destination),(Source),(Length))
220 static inline VOID PushEntryList(PSINGLE_LIST_ENTRY ListHead,PSINGLE_LIST_ENTRY Entry) G_GNUC_UNUSED;
221 #endif /* G_GNUC_UNUSED */
226 PSINGLE_LIST_ENTRY ListHead,
227 PSINGLE_LIST_ENTRY Entry
230 Entry->Next = ListHead->Next;
231 ListHead->Next = Entry;
241 * Removes an entry from a double linked list
244 * ListEntry = Entry to remove
246 #define RemoveEntryList(ListEntry) \
248 PLIST_ENTRY OldFlink; \
249 PLIST_ENTRY OldBlink; \
250 assert((ListEntry) != NULL); \
251 assert((ListEntry)->Blink!=NULL); \
252 assert((ListEntry)->Blink->Flink == (ListEntry)); \
253 assert((ListEntry)->Flink != NULL); \
254 assert((ListEntry)->Flink->Blink == (ListEntry)); \
255 OldFlink = (ListEntry)->Flink; \
256 OldBlink = (ListEntry)->Blink; \
257 OldFlink->Blink = OldBlink; \
258 OldBlink->Flink = OldFlink; \
259 (ListEntry)->Flink = NULL; \
260 (ListEntry)->Blink = NULL; \
267 * PLIST_ENTRY ListHead
271 * Removes the head entry from a double linked list
274 * ListHead = Head of the list
280 #define RemoveHeadList(ListHead) \
282 {RemoveEntryList((ListHead)->Flink)}
292 static inline PLIST_ENTRY RemoveHeadList(PLIST_ENTRY ListHead) G_GNUC_UNUSED;
293 #endif /* G_GNUC_UNUSED */
302 PLIST_ENTRY OldFlink;
303 PLIST_ENTRY OldBlink;
305 Old = ListHead->Flink;
307 OldFlink = ListHead->Flink->Flink;
308 OldBlink = ListHead->Flink->Blink;
309 OldFlink->Blink = OldBlink;
310 OldBlink->Flink = OldFlink;
324 * PLIST_ENTRY ListHead
328 * Removes the tail entry from a double linked list
331 * ListHead = Head of the list
337 #define RemoveTailList(ListHead) \
339 {RemoveEntryList((ListHead)->Blink)}
349 static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY ListHead) G_GNUC_UNUSED;
350 #endif /* G_GNUC_UNUSED */
359 PLIST_ENTRY OldFlink;
360 PLIST_ENTRY OldBlink;
362 Old = ListHead->Blink;
364 OldFlink = ListHead->Blink->Flink;
365 OldBlink = ListHead->Blink->Blink;
366 OldFlink->Blink = OldBlink;
367 OldBlink->Flink = OldFlink;
379 RtlAppendUnicodeToString (
380 PUNICODE_STRING Destination,
394 RtlEqualUnicodeString (
395 PUNICODE_STRING String1,
396 PUNICODE_STRING String2,
397 BOOLEAN CaseInSensitive
401 RtlGetCallersAddress (
402 PVOID * CallersAddress
407 RtlQueryRegistryValues (
410 IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
417 RtlWriteRegistryValue (
427 RtlDeleteRegistryValue(IN ULONG RelativeTo,
432 RtlMoveMemory (PVOID Destination, CONST VOID* Source, ULONG Length);
435 RtlEqualLuid(IN PLUID Luid1,
447 RtlZeroMemory (PVOID Destination, ULONG Length);
449 #else /* __USE_W32API */
451 #include <ddk/ntifs.h>
453 #endif /* __USE_W32API */
457 * PURPOSE: Used with RtlCheckRegistryKey, RtlCreateRegistryKey,
458 * RtlDeleteRegistryKey
460 #define RTL_REGISTRY_ABSOLUTE 0
461 #define RTL_REGISTRY_SERVICES 1
462 #define RTL_REGISTRY_CONTROL 2
463 #define RTL_REGISTRY_WINDOWS_NT 3
464 #define RTL_REGISTRY_DEVICEMAP 4
465 #define RTL_REGISTRY_USER 5
466 #define RTL_REGISTRY_ENUM 6 // ReactOS specific: Used internally in kernel only
467 #define RTL_REGISTRY_MAXIMUM 7
469 #define RTL_REGISTRY_HANDLE 0x40000000
470 #define RTL_REGISTRY_OPTIONAL 0x80000000
473 #define SHORT_SIZE (sizeof(USHORT))
474 #define SHORT_MASK (SHORT_SIZE-1)
475 #define LONG_SIZE (sizeof(ULONG))
476 #define LONG_MASK (LONG_SIZE-1)
477 #define LOWBYTE_MASK 0x00FF
479 #define FIRSTBYTE(Value) ((Value) & LOWBYTE_MASK)
480 #define SECONDBYTE(Value) (((Value) >> 8) & LOWBYTE_MASK)
481 #define THIRDBYTE(Value) (((Value) >> 16) & LOWBYTE_MASK)
482 #define FOURTHBYTE(Value) (((Value) >> 24) & LOWBYTE_MASK)
484 /* FIXME: reverse byte-order on big-endian machines (e.g. MIPS) */
485 #define SHORT_LEAST_SIGNIFICANT_BIT 0
486 #define SHORT_MOST_SIGNIFICANT_BIT 1
488 #define LONG_LEAST_SIGNIFICANT_BIT 0
489 #define LONG_3RD_MOST_SIGNIFICANT_BIT 1
490 #define LONG_2RD_MOST_SIGNIFICANT_BIT 2
491 #define LONG_MOST_SIGNIFICANT_BIT 3
495 #if defined(__NTOSKRNL__) || defined(__NTDLL__)
496 #define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
497 #define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
499 #define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag)
500 #define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag)
501 #endif /* __NTOSKRNL__ || __NTDLL__ */
503 extern BOOLEAN NLS_MB_CODE_PAGE_TAG;
504 extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
508 * NOTE: ReactOS extensions
510 #define RtlMin(X,Y) (((X) < (Y))? (X) : (Y))
511 #define RtlMax(X,Y) (((X) > (Y))? (X) : (Y))
512 #define RtlMin3(X,Y,Z) (((X) < (Y)) ? RtlMin(X,Z) : RtlMin(Y,Z))
513 #define RtlMax3(X,Y,Z) (((X) > (Y)) ? RtlMax(X,Z) : RtlMax(Y,Z))
518 * InitializeUnicodeString(PUNICODE_STRING DestinationString,
520 * USHORT MaximumLength,
523 * Initialize n UNICODE_STRING from its fields. Use when you know the values of
524 * all the fields in advance
527 #define InitializeUnicodeString(__PDEST_STRING__,__LENGTH__,__MAXLENGTH__,__BUFFER__) \
529 (__PDEST_STRING__)->Length = (__LENGTH__); \
530 (__PDEST_STRING__)->MaximumLength = (__MAXLENGTH__); \
531 (__PDEST_STRING__)->Buffer = (__BUFFER__); \
537 * RtlInitUnicodeStringFromLiteral(PUNICODE_STRING DestinationString,
538 * PCWSTR SourceString);
540 * Initialize a UNICODE_STRING from a wide string literal. WARNING: use only with
541 * string literals and statically initialized arrays, it will calculate the wrong
545 /* Prevent hide of the inappropriate passed type by our
546 * de"const" of the string in the macro below.
549 static inline const WCHAR *_RtlInitUnicodeStringFromLiteral_typecheck(const WCHAR *s) G_GNUC_UNUSED;
550 #endif /* G_GNUC_UNUSED */
551 static inline const WCHAR *_RtlInitUnicodeStringFromLiteral_typecheck(const WCHAR *s) { return s; }
553 #define RtlInitUnicodeStringFromLiteral(__PDEST_STRING__,__SOURCE_STRING__) \
554 InitializeUnicodeString( \
555 (__PDEST_STRING__), \
556 sizeof(__SOURCE_STRING__) - sizeof(WCHAR), \
557 sizeof(__SOURCE_STRING__), \
558 (WCHAR * /* de"const" the string here */ )_RtlInitUnicodeStringFromLiteral_typecheck((__SOURCE_STRING__)) \
563 * Static initializer for UNICODE_STRING variables.
566 * UNICODE_STRING wstr = UNICODE_STRING_INITIALIZER(L"string");
569 #define UNICODE_STRING_INITIALIZER(__SOURCE_STRING__) \
571 sizeof((__SOURCE_STRING__)) - sizeof(WCHAR), \
572 sizeof((__SOURCE_STRING__)), \
573 (__SOURCE_STRING__) \
578 * Initializer for empty UNICODE_STRING variables.
581 * UNICODE_STRING wstr = EMPTY_UNICODE_STRING;
584 #define EMPTY_UNICODE_STRING {0, 0, NULL}
590 PSINGLE_LIST_ENTRY ListHead,
591 PSINGLE_LIST_ENTRY Entry
595 #define PushEntryList(ListHead,Entry) \
596 (Entry)->Next = (ListHead)->Next; \
597 (ListHead)->Next = (Entry)
605 * An ReactOS extension
608 static inline PSINGLE_LIST_ENTRY PopEntrySList(PSLIST_HEADER ListHead) G_GNUC_UNUSED;
609 #endif /* G_GNUC_UNUSED */
614 PSLIST_HEADER ListHead
617 PSINGLE_LIST_ENTRY ListEntry;
619 ListEntry = ListHead->s.Next.Next;
622 ListHead->s.Next.Next = ListEntry->Next;
624 ListHead->s.Sequence++;
631 * An ReactOS extension
634 static inline VOID PushEntrySList(PSLIST_HEADER ListHead,PSINGLE_LIST_ENTRY Entry) G_GNUC_UNUSED;
635 #endif /* G_GNUC_UNUSED */
640 PSLIST_HEADER ListHead,
641 PSINGLE_LIST_ENTRY Entry
644 Entry->Next = ListHead->s.Next.Next;
645 ListHead->s.Next.Next = Entry;
647 ListHead->s.Sequence++;
650 #else /* __USE_W32API */
653 * An ReactOS extension
659 PSLIST_HEADER ListHead
662 PSINGLE_LIST_ENTRY ListEntry;
664 ListEntry = ListHead->Next.Next;
667 ListHead->Next.Next = ListEntry->Next;
669 ListHead->Sequence++;
676 * An ReactOS extension
682 PSLIST_HEADER ListHead,
683 PSINGLE_LIST_ENTRY Entry
686 Entry->Next = ListHead->Next.Next;
687 ListHead->Next.Next = Entry;
689 ListHead->Sequence++;
692 #endif /* __USE_W32API */
697 RtlAddAtomToAtomTable (
698 IN PRTL_ATOM_TABLE AtomTable,
712 RtlAnsiCharToUnicodeChar (
718 RtlAnsiStringToUnicodeSize (
719 PANSI_STRING AnsiString
724 RtlAnsiStringToUnicodeString (
725 PUNICODE_STRING DestinationString,
726 PANSI_STRING SourceString,
727 BOOLEAN AllocateDestinationString
732 RtlAppendAsciizToString(
739 RtlAppendStringToString (
746 RtlAppendUnicodeStringToString (
747 PUNICODE_STRING Destination,
748 PUNICODE_STRING Source
754 PRTL_BITMAP BitMapHeader,
762 PRTL_BITMAP BitMapHeader,
770 PVOID FailedAssertion,
786 RtlCheckRegistryKey (
794 IN PRTL_BITMAP BitMapHeader
800 IN PRTL_BITMAP BitMapHeader,
801 IN ULONG StartingIndex,
802 IN ULONG NumberToClear
817 BOOLEAN CaseInsensitive
822 RtlCompareUnicodeString (
823 PUNICODE_STRING String1,
824 PUNICODE_STRING String2,
825 BOOLEAN CaseInsensitive
829 RtlCompressBuffer(IN USHORT CompressionFormatAndEngine,
830 IN PUCHAR UncompressedBuffer,
831 IN ULONG UncompressedBufferSize,
832 OUT PUCHAR CompressedBuffer,
833 IN ULONG CompressedBufferSize,
834 IN ULONG UncompressedChunkSize,
835 OUT PULONG FinalCompressedSize,
839 RtlCompressChunks(IN PUCHAR UncompressedBuffer,
840 IN ULONG UncompressedBufferSize,
841 OUT PUCHAR CompressedBuffer,
842 IN ULONG CompressedBufferSize,
843 IN OUT PCOMPRESSED_DATA_INFO CompressedDataInfo,
844 IN ULONG CompressedDataInfoLength,
847 LARGE_INTEGER STDCALL
848 RtlConvertLongToLargeInteger(IN LONG SignedInteger);
851 RtlConvertSidToUnicodeString(IN OUT PUNICODE_STRING String,
853 IN BOOLEAN AllocateString);
855 LARGE_INTEGER STDCALL
856 RtlConvertUlongToLargeInteger(IN ULONG UnsignedInteger);
874 #define RtlCopyBytes RtlCopyMemory
877 RtlCopyLuid(IN PLUID LuidDest,
881 RtlCopyLuidAndAttributesArray(ULONG Count,
882 PLUID_AND_ATTRIBUTES Src,
883 PLUID_AND_ATTRIBUTES Dest);
886 RtlCopySid(ULONG BufferLength,
891 RtlCopySidAndAttributesArray(ULONG Count,
892 PSID_AND_ATTRIBUTES Src,
894 PSID_AND_ATTRIBUTES Dest,
896 PVOID* RemainingSidArea,
897 PULONG RemainingSidAreaSize);
900 RtlCopyString(PSTRING DestinationString,
901 PSTRING SourceString);
904 RtlCopyUnicodeString(PUNICODE_STRING DestinationString,
905 PUNICODE_STRING SourceString);
908 RtlCreateAtomTable(IN ULONG TableSize,
909 IN OUT PRTL_ATOM_TABLE *AtomTable);
916 ULONG SizeToReserve, // dwMaximumSize
917 ULONG SizeToCommit, // dwInitialSize
919 PRTL_HEAP_DEFINITION Definition
924 RtlCreateRegistryKey (
931 RtlCreateSecurityDescriptor (
932 PSECURITY_DESCRIPTOR SecurityDescriptor,
938 RtlCreateUnicodeString (
939 OUT PUNICODE_STRING Destination,
944 RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
949 RtlCustomCPToUnicodeN (
950 PRTL_NLS_DATA NlsData,
951 PWCHAR UnicodeString,
959 RtlDecompressBuffer(IN USHORT CompressionFormat,
960 OUT PUCHAR UncompressedBuffer,
961 IN ULONG UncompressedBufferSize,
962 IN PUCHAR CompressedBuffer,
963 IN ULONG CompressedBufferSize,
964 OUT PULONG FinalUncompressedSize);
967 RtlDecompressChunks(OUT PUCHAR UncompressedBuffer,
968 IN ULONG UncompressedBufferSize,
969 IN PUCHAR CompressedBuffer,
970 IN ULONG CompressedBufferSize,
971 IN PUCHAR CompressedTail,
972 IN ULONG CompressedTailSize,
973 IN PCOMPRESSED_DATA_INFO CompressedDataInfo);
976 RtlDecompressFragment(IN USHORT CompressionFormat,
977 OUT PUCHAR UncompressedFragment,
978 IN ULONG UncompressedFragmentSize,
979 IN PUCHAR CompressedBuffer,
980 IN ULONG CompressedBufferSize,
981 IN ULONG FragmentOffset,
982 OUT PULONG FinalUncompressedSize,
986 RtlDeleteAtomFromAtomTable(IN PRTL_ATOM_TABLE AtomTable,
990 RtlDescribeChunk(IN USHORT CompressionFormat,
991 IN OUT PUCHAR *CompressedBuffer,
992 IN PUCHAR EndOfCompressedBufferPlus1,
993 OUT PUCHAR *ChunkBuffer,
994 OUT PULONG ChunkSize);
997 RtlDestroyAtomTable(IN PRTL_ATOM_TABLE AtomTable);
1000 RtlDestroyHeap(HANDLE hheap);
1004 RtlDowncaseUnicodeString (
1005 IN OUT PUNICODE_STRING DestinationString,
1006 IN PUNICODE_STRING SourceString,
1007 IN BOOLEAN AllocateDestinationString
1013 IN PRTL_ATOM_TABLE AtomTable,
1014 IN BOOLEAN DeletePinned
1019 RtlEnlargedIntegerMultiply (
1026 RtlEnlargedUnsignedDivide (
1027 ULARGE_INTEGER Dividend,
1034 RtlEnlargedUnsignedMultiply (
1044 BOOLEAN CaseInSensitive
1049 RtlExtendedIntegerMultiply (
1050 LARGE_INTEGER Multiplicand,
1056 RtlExtendedLargeIntegerDivide (
1057 LARGE_INTEGER Dividend,
1064 RtlExtendedMagicDivide (
1065 LARGE_INTEGER Dividend,
1066 LARGE_INTEGER MagicDivisor,
1072 RtlFillMemoryUlong (
1081 PRTL_BITMAP BitMapHeader,
1088 RtlFindClearBitsAndSet (
1089 PRTL_BITMAP BitMapHeader,
1096 RtlFindFirstRunClear (
1097 PRTL_BITMAP BitMapHeader,
1098 PULONG StartingIndex
1103 RtlFindFirstRunSet (
1104 PRTL_BITMAP BitMapHeader,
1105 PULONG StartingIndex
1110 RtlFindLongestRunClear (
1111 PRTL_BITMAP BitMapHeader,
1112 PULONG StartingIndex
1117 RtlFindLongestRunSet (
1118 PRTL_BITMAP BitMapHeader,
1119 PULONG StartingIndex
1125 IN PVOID BaseAddress,
1129 OUT PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry
1135 PRTL_BITMAP BitMapHeader,
1142 RtlFindSetBitsAndClear (
1143 PRTL_BITMAP BitMapHeader,
1150 RtlFormatCurrentUserKeyPath (
1151 IN OUT PUNICODE_STRING KeyPath
1157 PANSI_STRING AnsiString
1171 POEM_STRING OemString
1176 RtlFreeUnicodeString (
1177 PUNICODE_STRING UnicodeString
1181 RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
1182 IN BOOLEAN AllowExtendedCharacters,
1183 IN OUT PGENERATE_NAME_CONTEXT Context,
1184 OUT PUNICODE_STRING Name8dot3);
1187 RtlGetCompressionWorkSpaceSize(IN USHORT CompressionFormatAndEngine,
1188 OUT PULONG CompressBufferAndWorkSpaceSize,
1189 OUT PULONG CompressFragmentWorkSpaceSize);
1193 RtlGetDefaultCodePage (
1194 PUSHORT AnsiCodePage,
1200 RtlImageDirectoryEntryToData (
1213 PIMAGE_SECTION_HEADER
1215 RtlImageRvaToSection (
1216 PIMAGE_NT_HEADERS NtHeader,
1224 PIMAGE_NT_HEADERS NtHeader,
1227 PIMAGE_SECTION_HEADER *SectionHeader
1233 PANSI_STRING DestinationString,
1240 PSTRING DestinationString,
1246 RtlInitUnicodeString (
1247 PUNICODE_STRING DestinationString,
1253 RtlInitializeBitMap (
1254 IN OUT PRTL_BITMAP BitMapHeader,
1255 IN PULONG BitMapBuffer,
1256 IN ULONG SizeOfBitMap
1261 RtlInitializeContext (
1262 IN HANDLE ProcessHandle,
1263 IN PCONTEXT Context,
1265 IN PTHREAD_START_ROUTINE StartAddress,
1266 IN OUT PUSER_STACK UserStack
1271 RtlInitializeGenericTable (
1272 IN OUT PRTL_GENERIC_TABLE Table,
1273 IN PVOID CompareRoutine,
1274 IN PVOID AllocateRoutine,
1275 IN PVOID FreeRoutine,
1276 IN ULONG UserParameter
1281 RtlInsertElementGenericTable (
1282 IN OUT PRTL_GENERIC_TABLE Table,
1284 IN ULONG ElementSize,
1285 IN PBOOLEAN NewElement OPTIONAL
1290 RtlLookupElementGenericTableFull (
1291 IN OUT PRTL_GENERIC_TABLE Table,
1293 OUT PVOID *NodeOrParent,
1294 OUT TABLE_SEARCH_RESULT *SearchResult
1308 RtlIntegerToUnicodeString (
1311 IN OUT PUNICODE_STRING String
1316 RtlIsGenericTableEmpty (
1317 IN PRTL_GENERIC_TABLE Table
1321 RtlIsNameLegalDOS8Dot3(IN PUNICODE_STRING UnicodeName,
1322 IN PANSI_STRING AnsiName,
1323 OUT PBOOLEAN SpacesFound);
1326 RtlIsTextUnicode (PVOID Buffer,
1332 RtlLargeIntegerAdd (
1333 LARGE_INTEGER Addend1,
1334 LARGE_INTEGER Addend2
1339 * RtlLargeIntegerAnd (
1340 * PLARGE_INTEGER Result,
1341 * LARGE_INTEGER Source,
1342 * LARGE_INTEGER Mask
1345 #define RtlLargeIntegerAnd(Result, Source, Mask) \
1347 Result.HighPart = Source.HighPart & Mask.HighPart; \
1348 Result.LowPart = Source.LowPart & Mask.LowPart; \
1353 RtlLargeIntegerArithmeticShift (
1354 LARGE_INTEGER LargeInteger,
1360 RtlLargeIntegerDivide (
1361 LARGE_INTEGER Dividend,
1362 LARGE_INTEGER Divisor,
1363 PLARGE_INTEGER Remainder
1368 * RtlLargeIntegerEqualTo (
1369 * LARGE_INTEGER Operand1,
1370 * LARGE_INTEGER Operand2
1373 #define RtlLargeIntegerEqualTo(X,Y) \
1374 (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1378 * RtlLargeIntegerEqualToZero (
1379 * LARGE_INTEGER Operand
1382 #define RtlLargeIntegerEqualToZero(X) \
1383 (!((X).LowPart | (X).HighPart))
1387 * RtlLargeIntegerGreaterThan (
1388 * LARGE_INTEGER Operand1,
1389 * LARGE_INTEGER Operand2
1392 #define RtlLargeIntegerGreaterThan(X,Y) \
1393 ((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
1394 ((X).HighPart > (Y).HighPart))
1398 * RtlLargeIntegerGreaterThanOrEqualTo (
1399 * LARGE_INTEGER Operand1,
1400 * LARGE_INTEGER Operand2
1403 #define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
1404 ((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
1405 ((X).HighPart > (Y).HighPart))
1409 * RtlLargeIntegerGreaterThanOrEqualToZero (
1410 * LARGE_INTEGER Operand1
1413 #define RtlLargeIntegerGreaterOrEqualToZero(X) \
1418 * RtlLargeIntegerGreaterThanZero (
1419 * LARGE_INTEGER Operand1
1422 #define RtlLargeIntegerGreaterThanZero(X) \
1423 ((((X).HighPart == 0) && ((X).LowPart > 0)) || \
1424 ((X).HighPart > 0 ))
1428 * RtlLargeIntegerLessThan (
1429 * LARGE_INTEGER Operand1,
1430 * LARGE_INTEGER Operand2
1433 #define RtlLargeIntegerLessThan(X,Y) \
1434 ((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
1435 ((X).HighPart < (Y).HighPart))
1439 * RtlLargeIntegerLessThanOrEqualTo (
1440 * LARGE_INTEGER Operand1,
1441 * LARGE_INTEGER Operand2
1444 #define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
1445 ((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
1446 ((X).HighPart < (Y).HighPart))
1450 * RtlLargeIntegerLessThanOrEqualToZero (
1451 * LARGE_INTEGER Operand
1454 #define RtlLargeIntegerLessOrEqualToZero(X) \
1455 (((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
1459 * RtlLargeIntegerLessThanZero (
1460 * LARGE_INTEGER Operand
1463 #define RtlLargeIntegerLessThanZero(X) \
1464 (((X).HighPart < 0))
1468 RtlLargeIntegerNegate (
1469 LARGE_INTEGER Subtrahend
1474 * RtlLargeIntegerNotEqualTo (
1475 * LARGE_INTEGER Operand1,
1476 * LARGE_INTEGER Operand2
1479 #define RtlLargeIntegerNotEqualTo(X,Y) \
1480 ((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1484 * RtlLargeIntegerNotEqualToZero (
1485 * LARGE_INTEGER Operand
1488 #define RtlLargeIntegerNotEqualToZero(X) \
1489 (((X).LowPart | (X).HighPart))
1493 RtlLargeIntegerShiftLeft (
1494 LARGE_INTEGER LargeInteger,
1500 RtlLargeIntegerShiftRight (
1501 LARGE_INTEGER LargeInteger,
1507 RtlLargeIntegerSubtract (
1508 LARGE_INTEGER Minuend,
1509 LARGE_INTEGER Subtrahend
1514 RtlLengthSecurityDescriptor (
1515 PSECURITY_DESCRIPTOR SecurityDescriptor
1526 RtlLookupAtomInAtomTable (
1527 IN PRTL_ATOM_TABLE AtomTable,
1534 RtlMultiByteToUnicodeN (
1535 PWCHAR UnicodeString,
1544 RtlMultiByteToUnicodeSize (
1552 RtlNtStatusToDosError (
1558 RtlNtStatusToDosErrorNoTeb (
1564 RtlNtStatusToPsxErrno (
1570 RtlNumberGenericTableElements (
1571 IN PRTL_GENERIC_TABLE Table
1576 RtlNumberOfClearBits (
1577 PRTL_BITMAP BitMapHeader
1582 RtlNumberOfSetBits (
1583 PRTL_BITMAP BitMapHeader
1588 RtlOemStringToUnicodeSize (
1589 POEM_STRING AnsiString
1594 RtlOemStringToUnicodeString (
1595 PUNICODE_STRING DestinationString,
1596 POEM_STRING SourceString,
1597 BOOLEAN AllocateDestinationString
1603 PWCHAR UnicodeString,
1611 RtlPinAtomInAtomTable (
1612 IN PRTL_ATOM_TABLE AtomTable,
1619 PANSI_STRING String1,
1620 PANSI_STRING String2,
1621 BOOLEAN CaseInsensitive
1626 RtlPrefixUnicodeString (
1627 PUNICODE_STRING String1,
1628 PUNICODE_STRING String2,
1629 BOOLEAN CaseInsensitive
1634 RtlQueryAtomInAtomTable (
1635 IN PRTL_ATOM_TABLE AtomTable,
1637 IN OUT PULONG RefCount OPTIONAL,
1638 IN OUT PULONG PinCount OPTIONAL,
1639 IN OUT PWSTR AtomName OPTIONAL,
1640 IN OUT PULONG NameLength OPTIONAL
1645 RtlQueryTimeZoneInformation (
1646 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1652 IN PEXCEPTION_RECORD ExceptionRecord
1665 RtlReserveChunk(IN USHORT CompressionFormat,
1666 IN OUT PUCHAR *CompressedBuffer,
1667 IN PUCHAR EndOfCompressedBufferPlus1,
1668 OUT PUCHAR *ChunkBuffer,
1669 IN ULONG ChunkSize);
1673 * RtlRetrieveUlong (
1674 * PULONG DestinationAddress,
1675 * PULONG SourceAddress
1678 #define RtlRetrieveUlong(DestAddress,SrcAddress) \
1679 if ((ULONG)(SrcAddress) & LONG_MASK) \
1681 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1682 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1683 ((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
1684 ((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
1688 *((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
1693 * RtlRetrieveUshort (
1694 * PUSHORT DestinationAddress,
1695 * PUSHORT SourceAddress
1698 #define RtlRetrieveUshort(DestAddress,SrcAddress) \
1699 if ((ULONG)(SrcAddress) & SHORT_MASK) \
1701 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1702 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1706 *((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
1711 RtlSecondsSince1970ToTime (
1712 ULONG SecondsSince1970,
1718 RtlSecondsSince1980ToTime (
1719 ULONG SecondsSince1980,
1726 IN PRTL_BITMAP BitMapHeader
1732 PRTL_BITMAP BitMapHeader,
1733 ULONG StartingIndex,
1739 RtlSetDaclSecurityDescriptor (
1740 PSECURITY_DESCRIPTOR SecurityDescriptor,
1741 BOOLEAN DaclPresent,
1743 BOOLEAN DaclDefaulted
1748 RtlSetTimeZoneInformation (
1749 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1767 #define RtlStoreUlong(Address,Value) \
1768 if ((ULONG)(Address) & LONG_MASK) \
1770 ((PUCHAR)(Address))[LONG_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1771 ((PUCHAR)(Address))[LONG_3RD_MOST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1772 ((PUCHAR)(Address))[LONG_2ND_MOST_SIGNIFICANT_BIT]=(UCHAR)(THIRDBYTE(Value)); \
1773 ((PUCHAR)(Address))[LONG_MOST_SIGNIFICANT_BIT]=(UCHAR)(FOURTHBYTE(Value)); \
1777 *((PULONG)(Address))=(ULONG)(Value); \
1787 #define RtlStoreUshort(Address,Value) \
1788 if ((ULONG)(Address) & SHORT_MASK) \
1790 ((PUCHAR)(Address))[SHORT_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1791 ((PUCHAR)(Address))[SHORT_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
1795 *((PUSHORT)(Address))=(USHORT)(Value); \
1800 RtlTimeFieldsToTime (
1801 PTIME_FIELDS TimeFields,
1807 RtlTimeToSecondsSince1970 (
1808 PLARGE_INTEGER Time,
1809 PULONG SecondsSince1970
1814 RtlTimeToSecondsSince1980 (
1815 PLARGE_INTEGER Time,
1816 PULONG SecondsSince1980
1821 RtlTimeToTimeFields (
1822 PLARGE_INTEGER Time,
1823 PTIME_FIELDS TimeFields
1828 RtlUnicodeStringToAnsiSize (
1829 IN PUNICODE_STRING UnicodeString
1834 RtlUnicodeStringToAnsiString (
1835 IN OUT PANSI_STRING DestinationString,
1836 IN PUNICODE_STRING SourceString,
1837 IN BOOLEAN AllocateDestinationString
1842 RtlUnicodeStringToInteger (
1843 IN PUNICODE_STRING String,
1850 RtlUnicodeStringToOemSize (
1851 IN PUNICODE_STRING UnicodeString
1856 RtlUnicodeStringToCountedOemString (
1857 IN OUT POEM_STRING DestinationString,
1858 IN PUNICODE_STRING SourceString,
1859 IN BOOLEAN AllocateDestinationString
1864 RtlUnicodeStringToOemString (
1865 IN OUT POEM_STRING DestinationString,
1866 IN PUNICODE_STRING SourceString,
1867 IN BOOLEAN AllocateDestinationString
1872 RtlUnicodeToCustomCPN (
1873 PRTL_NLS_DATA NlsData,
1877 PWCHAR UnicodeString,
1883 RtlUnicodeToMultiByteN (
1887 PWCHAR UnicodeString,
1893 RtlUnicodeToMultiByteSize (
1895 PWCHAR UnicodeString,
1905 PWCHAR UnicodeString,
1918 PEXCEPTION_REGISTRATION RegistrationFrame,
1919 PVOID ReturnAddress,
1920 PEXCEPTION_RECORD ExceptionRecord,
1926 RtlUpcaseUnicodeChar (
1932 RtlUpcaseUnicodeString (
1933 IN OUT PUNICODE_STRING DestinationString,
1934 IN PUNICODE_STRING SourceString,
1935 IN BOOLEAN AllocateDestinationString
1940 RtlUpcaseUnicodeStringToAnsiString (
1941 IN OUT PANSI_STRING DestinationString,
1942 IN PUNICODE_STRING SourceString,
1943 IN BOOLEAN AllocateDestinationString
1948 RtlUpcaseUnicodeStringToCountedOemString (
1949 IN OUT POEM_STRING DestinationString,
1950 IN PUNICODE_STRING SourceString,
1951 IN BOOLEAN AllocateDestinationString
1956 RtlUpcaseUnicodeStringToOemString (
1957 IN OUT POEM_STRING DestinationString,
1958 IN PUNICODE_STRING SourceString,
1959 IN BOOLEAN AllocateDestinationString
1964 RtlUpcaseUnicodeToCustomCPN (
1965 PRTL_NLS_DATA NlsData,
1969 PWCHAR UnicodeString,
1975 RtlUpcaseUnicodeToMultiByteN (
1979 PWCHAR UnicodeString,
1985 RtlUpcaseUnicodeToOemN (
1989 PWCHAR UnicodeString,
2002 PSTRING DestinationString,
2003 PSTRING SourceString
2016 RtlValidSecurityDescriptor (
2017 PSECURITY_DESCRIPTOR SecurityDescriptor
2021 RtlValidSid(IN PSID Sid);
2025 RtlxAnsiStringToUnicodeSize (
2026 IN PANSI_STRING AnsiString
2031 RtlxOemStringToUnicodeSize (
2032 IN POEM_STRING OemString
2037 RtlxUnicodeStringToAnsiSize (
2038 IN PUNICODE_STRING UnicodeString
2043 RtlxUnicodeStringToOemSize (
2044 IN PUNICODE_STRING UnicodeString
2048 /* Register io functions */
2052 READ_REGISTER_UCHAR (
2058 READ_REGISTER_USHORT (
2064 READ_REGISTER_ULONG (
2070 READ_REGISTER_BUFFER_UCHAR (
2078 READ_REGISTER_BUFFER_USHORT (
2086 READ_REGISTER_BUFFER_ULONG (
2094 WRITE_REGISTER_UCHAR (
2101 WRITE_REGISTER_USHORT (
2108 WRITE_REGISTER_ULONG (
2115 WRITE_REGISTER_BUFFER_UCHAR (
2123 WRITE_REGISTER_BUFFER_USHORT (
2131 WRITE_REGISTER_BUFFER_ULONG (
2138 NTSTATUS STDCALL RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision);
2139 NTSTATUS STDCALL RtlQueryInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
2140 NTSTATUS STDCALL RtlSetInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
2141 BOOLEAN STDCALL RtlValidAcl (PACL Acl);
2143 NTSTATUS STDCALL RtlAddAccessAllowedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
2144 NTSTATUS STDCALL RtlAddAccessDeniedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
2145 NTSTATUS STDCALL RtlAddAce(PACL Acl, ULONG Revision, ULONG StartingIndex, PACE AceList, ULONG AceListLength);
2146 NTSTATUS STDCALL RtlAddAuditAccessAce (PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid, BOOLEAN Success, BOOLEAN Failure);
2147 NTSTATUS STDCALL RtlDeleteAce(PACL Acl, ULONG AceIndex);
2148 BOOLEAN STDCALL RtlFirstFreeAce(PACL Acl, PACE* Ace);
2149 NTSTATUS STDCALL RtlGetAce(PACL Acl, ULONG AceIndex, PACE *Ace);
2151 NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
2152 NTSTATUS STDCALL RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
2153 NTSTATUS STDCALL RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG Revision);
2154 BOOLEAN STDCALL RtlValidSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
2155 ULONG STDCALL RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
2156 NTSTATUS STDCALL RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN DaclPresent, PACL Dacl, BOOLEAN DaclDefaulted);
2157 NTSTATUS STDCALL RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN DaclPresent, PACL* Dacl, PBOOLEAN DaclDefauted);
2158 NTSTATUS STDCALL RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Owner, BOOLEAN OwnerDefaulted);
2159 NTSTATUS STDCALL RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Owner, PBOOLEAN OwnerDefaulted);
2160 NTSTATUS STDCALL RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Group, BOOLEAN GroupDefaulted);
2161 NTSTATUS STDCALL RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Group, PBOOLEAN GroupDefaulted);
2162 NTSTATUS STDCALL RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSECURITY_DESCRIPTOR_CONTROL Control, PULONG Revision);
2163 NTSTATUS STDCALL RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN SaclPresent, PACL Sacl, BOOLEAN SaclDefaulted);
2164 NTSTATUS STDCALL RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN SaclPresent, PACL* Sacl, PBOOLEAN SaclDefauted);
2165 NTSTATUS STDCALL RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD,
2166 PSECURITY_DESCRIPTOR AbsSD,
2177 NTSTATUS STDCALL RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
2178 UCHAR SubAuthorityCount,
2179 ULONG SubAuthority0,
2180 ULONG SubAuthority1,
2181 ULONG SubAuthority2,
2182 ULONG SubAuthority3,
2183 ULONG SubAuthority4,
2184 ULONG SubAuthority5,
2185 ULONG SubAuthority6,
2186 ULONG SubAuthority7,
2188 ULONG STDCALL RtlLengthRequiredSid (UCHAR SubAuthorityCount);
2189 PSID_IDENTIFIER_AUTHORITY STDCALL RtlIdentifierAuthoritySid (PSID Sid);
2190 NTSTATUS STDCALL RtlInitializeSid (PSID Sid, PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, UCHAR SubAuthorityCount);
2191 PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
2192 BOOLEAN STDCALL RtlEqualPrefixSid (PSID Sid1, PSID Sid2);
2193 BOOLEAN STDCALL RtlEqualSid(PSID Sid1, PSID Sid2);
2194 PSID STDCALL RtlFreeSid (PSID Sid);
2195 ULONG STDCALL RtlLengthSid (PSID Sid);
2196 PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
2197 PUCHAR STDCALL RtlSubAuthorityCountSid (PSID Sid);
2198 BOOLEAN STDCALL RtlValidSid (PSID Sid);
2199 NTSTATUS STDCALL RtlConvertSidToUnicodeString (PUNICODE_STRING String, PSID Sid, BOOLEAN AllocateBuffer);
2201 BOOLEAN STDCALL RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
2202 BOOLEAN STDCALL RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
2203 VOID STDCALL RtlMapGenericMask (PACCESS_MASK AccessMask, PGENERIC_MAPPING GenericMapping);
2206 /* functions exported from NTOSKRNL.EXE which are considered RTL */
2208 #if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
2210 char *_itoa (int value, char *string, int radix);
2211 int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
2212 int _snwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, ...);
2213 int _stricmp(const char *s1, const char *s2);
2214 char * _strlwr(char *x);
2215 int _strnicmp(const char *s1, const char *s2, size_t n);
2216 char * _strnset(char* szToFill, int szFill, size_t sizeMaxFill);
2217 char * _strrev(char *s);
2218 char * _strset(char* szToFill, int szFill);
2219 char * _strupr(char *x);
2220 int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args);
2221 int _wcsicmp (const wchar_t* cs, const wchar_t* ct);
2222 wchar_t * _wcslwr (wchar_t *x);
2223 int _wcsnicmp (const wchar_t * cs,const wchar_t * ct,size_t count);
2224 wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
2225 wchar_t * _wcsrev(wchar_t *s);
2226 wchar_t *_wcsupr(wchar_t *x);
2228 int atoi(const char *str);
2229 long atol(const char *str);
2235 int isxdigit(int c);
2236 size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count);
2237 int mbtowc (wchar_t *wchar, const char *mbchar, size_t count);
2238 void * memchr(const void *s, int c, size_t n);
2239 void * memcpy(void *to, const void *from, size_t count);
2240 void * memmove(void *dest,const void *src, size_t count);
2241 void * memset(void *src, int val, size_t count);
2248 int sprintf(char * buf, const char *fmt, ...);
2249 void srand(unsigned seed);
2250 char * strcat(char *s, const char *append);
2251 char * strchr(const char *s, int c);
2252 int strcmp(const char *s1, const char *s2);
2253 char * strcpy(char *to, const char *from);
2254 size_t strlen(const char *str);
2255 char * strncat(char *dst, const char *src, size_t n);
2256 int strncmp(const char *s1, const char *s2, size_t n);
2257 char *strncpy(char *dst, const char *src, size_t n);
2258 char *strrchr(const char *s, int c);
2259 size_t strspn(const char *s1, const char *s2);
2260 char *strstr(const char *s, const char *find);
2261 int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
2264 wchar_t towlower(wchar_t c);
2265 wchar_t towupper(wchar_t c);
2266 int vsprintf(char *buf, const char *fmt, va_list args);
2267 wchar_t * wcscat(wchar_t *dest, const wchar_t *src);
2268 wchar_t * wcschr(const wchar_t *str, wchar_t ch);
2269 int wcscmp(const wchar_t *cs, const wchar_t *ct);
2270 wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2);
2271 size_t wcscspn(const wchar_t *str,const wchar_t *reject);
2272 size_t wcslen(const wchar_t *s);
2273 wchar_t * wcsncat(wchar_t *dest, const wchar_t *src, size_t count);
2274 int wcsncmp(const wchar_t *cs, const wchar_t *ct, size_t count);
2275 wchar_t * wcsncpy(wchar_t *dest, const wchar_t *src, size_t count);
2276 wchar_t * wcsrchr(const wchar_t *str, wchar_t ch);
2277 size_t wcsspn(const wchar_t *str,const wchar_t *accept);
2278 wchar_t *wcsstr(const wchar_t *s,const wchar_t *b);
2279 size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count);
2280 int wctomb (char *mbchar, wchar_t wchar);
2282 #endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
2284 #endif /* __DDK_RTL_H */