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 * InitializeObjectAttributes (
34 * POBJECT_ATTRIBUTES InitializedAttributes,
35 * PUNICODE_STRING ObjectName,
37 * HANDLE RootDirectory,
38 * PSECURITY_DESCRIPTOR SecurityDescriptor
41 * FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a
42 * subsequent call to ZwCreateXXX or ZwOpenXXX
44 * InitializedAttributes (OUT) = Caller supplied storage for the
46 * ObjectName = Full path name for object
47 * Attributes = Attributes for the object
48 * RootDirectory = Where the object should be placed or NULL
49 * SecurityDescriptor = Ignored
51 #define InitializeObjectAttributes(p,n,a,r,s) \
53 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
54 (p)->ObjectName = n; \
55 (p)->Attributes = a; \
56 (p)->RootDirectory = r; \
57 (p)->SecurityDescriptor = s; \
58 (p)->SecurityQualityOfService = NULL; \
64 * InitializeListHead (
65 * PLIST_ENTRY ListHead
68 * FUNCTION: Initializes a double linked list
70 * ListHead = Caller supplied storage for the head of the list
72 #define InitializeListHead(ListHead) \
74 (ListHead)->Flink = (ListHead); \
75 (ListHead)->Blink = (ListHead); \
82 * PLIST_ENTRY ListHead,
86 * FUNCTION: Inserts an entry in a double linked list
88 * ListHead = Head of the list
89 * Entry = Entry to insert
91 #define InsertHeadList(ListHead, ListEntry) \
93 PLIST_ENTRY OldFlink; \
94 OldFlink = (ListHead)->Flink; \
95 (ListEntry)->Flink = OldFlink; \
96 (ListEntry)->Blink = (ListHead); \
97 OldFlink->Blink = (ListEntry); \
98 (ListHead)->Flink = (ListEntry); \
99 assert((ListEntry) != NULL); \
100 assert((ListEntry)->Blink!=NULL); \
101 assert((ListEntry)->Blink->Flink == (ListEntry)); \
102 assert((ListEntry)->Flink != NULL); \
103 assert((ListEntry)->Flink->Blink == (ListEntry)); \
110 * PLIST_ENTRY ListHead,
115 * Inserts an entry in a double linked list
118 * ListHead = Head of the list
119 * Entry = Entry to insert
121 #define InsertTailList(ListHead, ListEntry) \
123 PLIST_ENTRY OldBlink; \
124 OldBlink = (ListHead)->Blink; \
125 (ListEntry)->Flink = (ListHead); \
126 (ListEntry)->Blink = OldBlink; \
127 OldBlink->Flink = (ListEntry); \
128 (ListHead)->Blink = (ListEntry); \
129 assert((ListEntry) != NULL); \
130 assert((ListEntry)->Blink != NULL); \
131 assert((ListEntry)->Blink->Flink == (ListEntry)); \
132 assert((ListEntry)->Flink != NULL); \
133 assert((ListEntry)->Flink->Blink == (ListEntry)); \
139 * PLIST_ENTRY ListHead
143 * Checks if a double linked list is empty
146 * ListHead = Head of the list
148 #define IsListEmpty(ListHead) \
149 ((ListHead)->Flink == (ListHead))
155 * PSINGLE_LIST_ENTRY ListHead
159 * Removes an entry from the head of a single linked list
162 * ListHead = Head of the list
168 #define PopEntryList(ListHead) \
171 PSINGLE_LIST_ENTRY FirstEntry; \
172 FirstEntry = (ListHead)->Next; \
173 if (FirstEntry != NULL) \
175 (ListHead)->Next = FirstEntry->Next; \
179 static inline PSINGLE_LIST_ENTRY
180 PopEntryList(PSINGLE_LIST_ENTRY ListHead)
182 PSINGLE_LIST_ENTRY ListEntry;
184 ListEntry = ListHead->Next;
187 ListHead->Next = ListEntry->Next;
193 #define RtlCopyMemory(Destination,Source,Length) \
194 memcpy((Destination),(Source),(Length))
200 PSINGLE_LIST_ENTRY ListHead,
201 PSINGLE_LIST_ENTRY Entry
204 Entry->Next = ListHead->Next;
205 ListHead->Next = Entry;
215 * Removes an entry from a double linked list
218 * ListEntry = Entry to remove
220 #define RemoveEntryList(ListEntry) \
222 PLIST_ENTRY OldFlink; \
223 PLIST_ENTRY OldBlink; \
224 assert((ListEntry) != NULL); \
225 assert((ListEntry)->Blink!=NULL); \
226 assert((ListEntry)->Blink->Flink == (ListEntry)); \
227 assert((ListEntry)->Flink != NULL); \
228 assert((ListEntry)->Flink->Blink == (ListEntry)); \
229 OldFlink = (ListEntry)->Flink; \
230 OldBlink = (ListEntry)->Blink; \
231 OldFlink->Blink = OldBlink; \
232 OldBlink->Flink = OldFlink; \
233 (ListEntry)->Flink = NULL; \
234 (ListEntry)->Blink = NULL; \
241 * PLIST_ENTRY ListHead
245 * Removes the head entry from a double linked list
248 * ListHead = Head of the list
254 #define RemoveHeadList(ListHead) \
256 {RemoveEntryList((ListHead)->Flink)}
273 PLIST_ENTRY OldFlink;
274 PLIST_ENTRY OldBlink;
276 Old = ListHead->Flink;
278 OldFlink = ListHead->Flink->Flink;
279 OldBlink = ListHead->Flink->Blink;
280 OldFlink->Blink = OldBlink;
281 OldBlink->Flink = OldFlink;
295 * PLIST_ENTRY ListHead
299 * Removes the tail entry from a double linked list
302 * ListHead = Head of the list
308 #define RemoveTailList(ListHead) \
310 {RemoveEntryList((ListHead)->Blink)}
327 PLIST_ENTRY OldFlink;
328 PLIST_ENTRY OldBlink;
330 Old = ListHead->Blink;
332 OldFlink = ListHead->Blink->Flink;
333 OldBlink = ListHead->Blink->Blink;
334 OldFlink->Blink = OldBlink;
335 OldBlink->Flink = OldFlink;
347 RtlAppendUnicodeToString (
348 PUNICODE_STRING Destination,
362 RtlEqualUnicodeString (
363 PUNICODE_STRING String1,
364 PUNICODE_STRING String2,
365 BOOLEAN CaseInSensitive
369 RtlGetCallersAddress (
370 PVOID * CallersAddress
375 RtlQueryRegistryValues (
378 IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
385 RtlWriteRegistryValue (
395 RtlDeleteRegistryValue(IN ULONG RelativeTo,
400 RtlMoveMemory (PVOID Destination, CONST VOID* Source, ULONG Length);
403 RtlEqualLuid(IN PLUID Luid1,
415 RtlZeroMemory (PVOID Destination, ULONG Length);
417 #else /* __USE_W32API */
419 #include <ddk/ntifs.h>
421 #endif /* __USE_W32API */
425 * PURPOSE: Used with RtlCheckRegistryKey, RtlCreateRegistryKey,
426 * RtlDeleteRegistryKey
428 #define RTL_REGISTRY_ABSOLUTE 0
429 #define RTL_REGISTRY_SERVICES 1
430 #define RTL_REGISTRY_CONTROL 2
431 #define RTL_REGISTRY_WINDOWS_NT 3
432 #define RTL_REGISTRY_DEVICEMAP 4
433 #define RTL_REGISTRY_USER 5
434 #define RTL_REGISTRY_ENUM 6 // ReactOS specific: Used internally in kernel only
435 #define RTL_REGISTRY_MAXIMUM 7
437 #define RTL_REGISTRY_HANDLE 0x40000000
438 #define RTL_REGISTRY_OPTIONAL 0x80000000
441 #define SHORT_SIZE (sizeof(USHORT))
442 #define SHORT_MASK (SHORT_SIZE-1)
443 #define LONG_SIZE (sizeof(ULONG))
444 #define LONG_MASK (LONG_SIZE-1)
445 #define LOWBYTE_MASK 0x00FF
447 #define FIRSTBYTE(Value) ((Value) & LOWBYTE_MASK)
448 #define SECONDBYTE(Value) (((Value) >> 8) & LOWBYTE_MASK)
449 #define THIRDBYTE(Value) (((Value) >> 16) & LOWBYTE_MASK)
450 #define FOURTHBYTE(Value) (((Value) >> 24) & LOWBYTE_MASK)
452 /* FIXME: reverse byte-order on big-endian machines (e.g. MIPS) */
453 #define SHORT_LEAST_SIGNIFICANT_BIT 0
454 #define SHORT_MOST_SIGNIFICANT_BIT 1
456 #define LONG_LEAST_SIGNIFICANT_BIT 0
457 #define LONG_3RD_MOST_SIGNIFICANT_BIT 1
458 #define LONG_2RD_MOST_SIGNIFICANT_BIT 2
459 #define LONG_MOST_SIGNIFICANT_BIT 3
463 #if defined(__NTOSKRNL__) || defined(__NTDLL__)
464 #define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
465 #define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
467 #define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag)
468 #define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag)
469 #endif /* __NTOSKRNL__ || __NTDLL__ */
471 extern BOOLEAN NLS_MB_CODE_PAGE_TAG;
472 extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
476 * NOTE: ReactOS extensions
478 #define RtlMin(X,Y) (((X) < (Y))? (X) : (Y))
479 #define RtlMax(X,Y) (((X) > (Y))? (X) : (Y))
480 #define RtlMin3(X,Y,Z) (((X) < (Y)) ? RtlMin(X,Z) : RtlMin(Y,Z))
481 #define RtlMax3(X,Y,Z) (((X) > (Y)) ? RtlMax(X,Z) : RtlMax(Y,Z))
486 * InitializeUnicodeString(PUNICODE_STRING DestinationString,
488 * USHORT MaximumLength,
491 * Initialize n UNICODE_STRING from its fields. Use when you know the values of
492 * all the fields in advance
495 #define InitializeUnicodeString(__PDEST_STRING__,__LENGTH__,__MAXLENGTH__,__BUFFER__) \
497 (__PDEST_STRING__)->Length = (__LENGTH__); \
498 (__PDEST_STRING__)->MaximumLength = (__MAXLENGTH__); \
499 (__PDEST_STRING__)->Buffer = (__BUFFER__); \
505 * RtlInitUnicodeStringFromLiteral(PUNICODE_STRING DestinationString,
506 * PCWSTR SourceString);
508 * Initialize a UNICODE_STRING from a wide string literal. WARNING: use only with
509 * string literals and statically initialized arrays, it will calculate the wrong
513 #define RtlInitUnicodeStringFromLiteral(__PDEST_STRING__,__SOURCE_STRING__) \
514 InitializeUnicodeString( \
515 (__PDEST_STRING__), \
516 sizeof(__SOURCE_STRING__) - sizeof(WCHAR), \
517 sizeof(__SOURCE_STRING__), \
518 (__SOURCE_STRING__) \
523 * Static initializer for UNICODE_STRING variables.
526 * UNICODE_STRING wstr = UNICODE_STRING_INITIALIZER(L"string");
529 #define UNICODE_STRING_INITIALIZER(__SOURCE_STRING__) \
531 sizeof((__SOURCE_STRING__)) - sizeof(WCHAR), \
532 sizeof((__SOURCE_STRING__)), \
533 (__SOURCE_STRING__) \
538 * Initializer for empty UNICODE_STRING variables.
541 * UNICODE_STRING wstr = EMPTY_UNICODE_STRING;
544 #define EMPTY_UNICODE_STRING {0, 0, NULL}
550 PSINGLE_LIST_ENTRY ListHead,
551 PSINGLE_LIST_ENTRY Entry
555 #define PushEntryList(ListHead,Entry) \
556 (Entry)->Next = (ListHead)->Next; \
557 (ListHead)->Next = (Entry)
565 * An ReactOS extension
571 PSLIST_HEADER ListHead
574 PSINGLE_LIST_ENTRY ListEntry;
576 ListEntry = ListHead->s.Next.Next;
579 ListHead->s.Next.Next = ListEntry->Next;
581 ListHead->s.Sequence++;
588 * An ReactOS extension
594 PSLIST_HEADER ListHead,
595 PSINGLE_LIST_ENTRY Entry
598 Entry->Next = ListHead->s.Next.Next;
599 ListHead->s.Next.Next = Entry;
601 ListHead->s.Sequence++;
604 #else /* __USE_W32API */
607 * An ReactOS extension
613 PSLIST_HEADER ListHead
616 PSINGLE_LIST_ENTRY ListEntry;
618 ListEntry = ListHead->Next.Next;
621 ListHead->Next.Next = ListEntry->Next;
623 ListHead->Sequence++;
630 * An ReactOS extension
636 PSLIST_HEADER ListHead,
637 PSINGLE_LIST_ENTRY Entry
640 Entry->Next = ListHead->Next.Next;
641 ListHead->Next.Next = Entry;
643 ListHead->Sequence++;
646 #endif /* __USE_W32API */
651 RtlAddAtomToAtomTable (
652 IN PRTL_ATOM_TABLE AtomTable,
666 RtlAnsiCharToUnicodeChar (
672 RtlAnsiStringToUnicodeSize (
673 PANSI_STRING AnsiString
678 RtlAnsiStringToUnicodeString (
679 PUNICODE_STRING DestinationString,
680 PANSI_STRING SourceString,
681 BOOLEAN AllocateDestinationString
686 RtlAppendAsciizToString(
693 RtlAppendStringToString (
700 RtlAppendUnicodeStringToString (
701 PUNICODE_STRING Destination,
702 PUNICODE_STRING Source
708 PRTL_BITMAP BitMapHeader,
716 PRTL_BITMAP BitMapHeader,
724 PVOID FailedAssertion,
740 RtlCheckRegistryKey (
748 IN PRTL_BITMAP BitMapHeader
754 IN PRTL_BITMAP BitMapHeader,
755 IN ULONG StartingIndex,
756 IN ULONG NumberToClear
771 BOOLEAN CaseInsensitive
776 RtlCompareUnicodeString (
777 PUNICODE_STRING String1,
778 PUNICODE_STRING String2,
779 BOOLEAN CaseInsensitive
783 RtlCompressBuffer(IN USHORT CompressionFormatAndEngine,
784 IN PUCHAR UncompressedBuffer,
785 IN ULONG UncompressedBufferSize,
786 OUT PUCHAR CompressedBuffer,
787 IN ULONG CompressedBufferSize,
788 IN ULONG UncompressedChunkSize,
789 OUT PULONG FinalCompressedSize,
793 RtlCompressChunks(IN PUCHAR UncompressedBuffer,
794 IN ULONG UncompressedBufferSize,
795 OUT PUCHAR CompressedBuffer,
796 IN ULONG CompressedBufferSize,
797 IN OUT PCOMPRESSED_DATA_INFO CompressedDataInfo,
798 IN ULONG CompressedDataInfoLength,
801 LARGE_INTEGER STDCALL
802 RtlConvertLongToLargeInteger(IN LONG SignedInteger);
805 RtlConvertSidToUnicodeString(IN OUT PUNICODE_STRING String,
807 IN BOOLEAN AllocateString);
809 LARGE_INTEGER STDCALL
810 RtlConvertUlongToLargeInteger(IN ULONG UnsignedInteger);
828 #define RtlCopyBytes RtlCopyMemory
831 RtlCopyLuid(IN PLUID LuidDest,
835 RtlCopyLuidAndAttributesArray(ULONG Count,
836 PLUID_AND_ATTRIBUTES Src,
837 PLUID_AND_ATTRIBUTES Dest);
840 RtlCopySid(ULONG BufferLength,
845 RtlCopySidAndAttributesArray(ULONG Count,
846 PSID_AND_ATTRIBUTES Src,
848 PSID_AND_ATTRIBUTES Dest,
850 PVOID* RemainingSidArea,
851 PULONG RemainingSidAreaSize);
854 RtlCopyString(PSTRING DestinationString,
855 PSTRING SourceString);
858 RtlCopyUnicodeString(PUNICODE_STRING DestinationString,
859 PUNICODE_STRING SourceString);
862 RtlCreateAtomTable(IN ULONG TableSize,
863 IN OUT PRTL_ATOM_TABLE *AtomTable);
870 ULONG SizeToReserve, // dwMaximumSize
871 ULONG SizeToCommit, // dwInitialSize
873 PRTL_HEAP_DEFINITION Definition
878 RtlCreateRegistryKey (
885 RtlCreateSecurityDescriptor (
886 PSECURITY_DESCRIPTOR SecurityDescriptor,
892 RtlCreateUnicodeString (
893 OUT PUNICODE_STRING Destination,
898 RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
903 RtlCustomCPToUnicodeN (
904 PRTL_NLS_DATA NlsData,
905 PWCHAR UnicodeString,
913 RtlDecompressBuffer(IN USHORT CompressionFormat,
914 OUT PUCHAR UncompressedBuffer,
915 IN ULONG UncompressedBufferSize,
916 IN PUCHAR CompressedBuffer,
917 IN ULONG CompressedBufferSize,
918 OUT PULONG FinalUncompressedSize);
921 RtlDecompressChunks(OUT PUCHAR UncompressedBuffer,
922 IN ULONG UncompressedBufferSize,
923 IN PUCHAR CompressedBuffer,
924 IN ULONG CompressedBufferSize,
925 IN PUCHAR CompressedTail,
926 IN ULONG CompressedTailSize,
927 IN PCOMPRESSED_DATA_INFO CompressedDataInfo);
930 RtlDecompressFragment(IN USHORT CompressionFormat,
931 OUT PUCHAR UncompressedFragment,
932 IN ULONG UncompressedFragmentSize,
933 IN PUCHAR CompressedBuffer,
934 IN ULONG CompressedBufferSize,
935 IN ULONG FragmentOffset,
936 OUT PULONG FinalUncompressedSize,
940 RtlDeleteAtomFromAtomTable(IN PRTL_ATOM_TABLE AtomTable,
944 RtlDescribeChunk(IN USHORT CompressionFormat,
945 IN OUT PUCHAR *CompressedBuffer,
946 IN PUCHAR EndOfCompressedBufferPlus1,
947 OUT PUCHAR *ChunkBuffer,
948 OUT PULONG ChunkSize);
951 RtlDestroyAtomTable(IN PRTL_ATOM_TABLE AtomTable);
954 RtlDestroyHeap(HANDLE hheap);
958 RtlDowncaseUnicodeString (
959 IN OUT PUNICODE_STRING DestinationString,
960 IN PUNICODE_STRING SourceString,
961 IN BOOLEAN AllocateDestinationString
967 IN PRTL_ATOM_TABLE AtomTable,
968 IN BOOLEAN DeletePinned
973 RtlEnlargedIntegerMultiply (
980 RtlEnlargedUnsignedDivide (
981 ULARGE_INTEGER Dividend,
988 RtlEnlargedUnsignedMultiply (
998 BOOLEAN CaseInSensitive
1003 RtlExtendedIntegerMultiply (
1004 LARGE_INTEGER Multiplicand,
1010 RtlExtendedLargeIntegerDivide (
1011 LARGE_INTEGER Dividend,
1018 RtlExtendedMagicDivide (
1019 LARGE_INTEGER Dividend,
1020 LARGE_INTEGER MagicDivisor,
1026 RtlFillMemoryUlong (
1035 PRTL_BITMAP BitMapHeader,
1042 RtlFindClearBitsAndSet (
1043 PRTL_BITMAP BitMapHeader,
1050 RtlFindFirstRunClear (
1051 PRTL_BITMAP BitMapHeader,
1052 PULONG StartingIndex
1057 RtlFindFirstRunSet (
1058 PRTL_BITMAP BitMapHeader,
1059 PULONG StartingIndex
1064 RtlFindLongestRunClear (
1065 PRTL_BITMAP BitMapHeader,
1066 PULONG StartingIndex
1071 RtlFindLongestRunSet (
1072 PRTL_BITMAP BitMapHeader,
1073 PULONG StartingIndex
1079 IN PVOID BaseAddress,
1083 OUT PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry
1089 PRTL_BITMAP BitMapHeader,
1096 RtlFindSetBitsAndClear (
1097 PRTL_BITMAP BitMapHeader,
1104 RtlFormatCurrentUserKeyPath (
1105 IN OUT PUNICODE_STRING KeyPath
1111 PANSI_STRING AnsiString
1125 POEM_STRING OemString
1130 RtlFreeUnicodeString (
1131 PUNICODE_STRING UnicodeString
1135 RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
1136 IN BOOLEAN AllowExtendedCharacters,
1137 IN OUT PGENERATE_NAME_CONTEXT Context,
1138 OUT PUNICODE_STRING Name8dot3);
1141 RtlGetCompressionWorkSpaceSize(IN USHORT CompressionFormatAndEngine,
1142 OUT PULONG CompressBufferAndWorkSpaceSize,
1143 OUT PULONG CompressFragmentWorkSpaceSize);
1147 RtlGetDefaultCodePage (
1148 PUSHORT AnsiCodePage,
1154 RtlImageDirectoryEntryToData (
1167 PIMAGE_SECTION_HEADER
1169 RtlImageRvaToSection (
1170 PIMAGE_NT_HEADERS NtHeader,
1178 PIMAGE_NT_HEADERS NtHeader,
1181 PIMAGE_SECTION_HEADER *SectionHeader
1187 PANSI_STRING DestinationString,
1194 PSTRING DestinationString,
1200 RtlInitUnicodeString (
1201 PUNICODE_STRING DestinationString,
1207 RtlInitializeBitMap (
1208 IN OUT PRTL_BITMAP BitMapHeader,
1209 IN PULONG BitMapBuffer,
1210 IN ULONG SizeOfBitMap
1215 RtlInitializeContext (
1216 IN HANDLE ProcessHandle,
1217 IN PCONTEXT Context,
1219 IN PTHREAD_START_ROUTINE StartAddress,
1220 IN OUT PINITIAL_TEB InitialTeb
1225 RtlInitializeGenericTable (
1226 IN OUT PRTL_GENERIC_TABLE Table,
1227 IN PVOID CompareRoutine,
1228 IN PVOID AllocateRoutine,
1229 IN PVOID FreeRoutine,
1230 IN ULONG UserParameter
1235 RtlInsertElementGenericTable (
1236 IN OUT PRTL_GENERIC_TABLE Table,
1238 IN ULONG ElementSize,
1253 RtlIntegerToUnicodeString (
1256 IN OUT PUNICODE_STRING String
1261 RtlIsGenericTableEmpty (
1262 IN PRTL_GENERIC_TABLE Table
1266 RtlIsNameLegalDOS8Dot3(IN PUNICODE_STRING UnicodeName,
1267 IN PANSI_STRING AnsiName,
1268 OUT PBOOLEAN SpacesFound);
1272 RtlLargeIntegerAdd (
1273 LARGE_INTEGER Addend1,
1274 LARGE_INTEGER Addend2
1279 * RtlLargeIntegerAnd (
1280 * PLARGE_INTEGER Result,
1281 * LARGE_INTEGER Source,
1282 * LARGE_INTEGER Mask
1285 #define RtlLargeIntegerAnd(Result, Source, Mask) \
1287 Result.HighPart = Source.HighPart & Mask.HighPart; \
1288 Result.LowPart = Source.LowPart & Mask.LowPart; \
1293 RtlLargeIntegerArithmeticShift (
1294 LARGE_INTEGER LargeInteger,
1300 RtlLargeIntegerDivide (
1301 LARGE_INTEGER Dividend,
1302 LARGE_INTEGER Divisor,
1303 PLARGE_INTEGER Remainder
1308 * RtlLargeIntegerEqualTo (
1309 * LARGE_INTEGER Operand1,
1310 * LARGE_INTEGER Operand2
1313 #define RtlLargeIntegerEqualTo(X,Y) \
1314 (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1318 * RtlLargeIntegerEqualToZero (
1319 * LARGE_INTEGER Operand
1322 #define RtlLargeIntegerEqualToZero(X) \
1323 (!((X).LowPart | (X).HighPart))
1327 * RtlLargeIntegerGreaterThan (
1328 * LARGE_INTEGER Operand1,
1329 * LARGE_INTEGER Operand2
1332 #define RtlLargeIntegerGreaterThan(X,Y) \
1333 ((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
1334 ((X).HighPart > (Y).HighPart))
1338 * RtlLargeIntegerGreaterThanOrEqualTo (
1339 * LARGE_INTEGER Operand1,
1340 * LARGE_INTEGER Operand2
1343 #define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
1344 ((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
1345 ((X).HighPart > (Y).HighPart))
1349 * RtlLargeIntegerGreaterThanOrEqualToZero (
1350 * LARGE_INTEGER Operand1
1353 #define RtlLargeIntegerGreaterOrEqualToZero(X) \
1358 * RtlLargeIntegerGreaterThanZero (
1359 * LARGE_INTEGER Operand1
1362 #define RtlLargeIntegerGreaterThanZero(X) \
1363 ((((X).HighPart == 0) && ((X).LowPart > 0)) || \
1364 ((X).HighPart > 0 ))
1368 * RtlLargeIntegerLessThan (
1369 * LARGE_INTEGER Operand1,
1370 * LARGE_INTEGER Operand2
1373 #define RtlLargeIntegerLessThan(X,Y) \
1374 ((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
1375 ((X).HighPart < (Y).HighPart))
1379 * RtlLargeIntegerLessThanOrEqualTo (
1380 * LARGE_INTEGER Operand1,
1381 * LARGE_INTEGER Operand2
1384 #define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
1385 ((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
1386 ((X).HighPart < (Y).HighPart))
1390 * RtlLargeIntegerLessThanOrEqualToZero (
1391 * LARGE_INTEGER Operand
1394 #define RtlLargeIntegerLessOrEqualToZero(X) \
1395 (((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
1399 * RtlLargeIntegerLessThanZero (
1400 * LARGE_INTEGER Operand
1403 #define RtlLargeIntegerLessThanZero(X) \
1404 (((X).HighPart < 0))
1408 RtlLargeIntegerNegate (
1409 LARGE_INTEGER Subtrahend
1414 * RtlLargeIntegerNotEqualTo (
1415 * LARGE_INTEGER Operand1,
1416 * LARGE_INTEGER Operand2
1419 #define RtlLargeIntegerNotEqualTo(X,Y) \
1420 ((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1424 * RtlLargeIntegerNotEqualToZero (
1425 * LARGE_INTEGER Operand
1428 #define RtlLargeIntegerNotEqualToZero(X) \
1429 (((X).LowPart | (X).HighPart))
1433 RtlLargeIntegerShiftLeft (
1434 LARGE_INTEGER LargeInteger,
1440 RtlLargeIntegerShiftRight (
1441 LARGE_INTEGER LargeInteger,
1447 RtlLargeIntegerSubtract (
1448 LARGE_INTEGER Minuend,
1449 LARGE_INTEGER Subtrahend
1454 RtlLengthSecurityDescriptor (
1455 PSECURITY_DESCRIPTOR SecurityDescriptor
1466 RtlLookupAtomInAtomTable (
1467 IN PRTL_ATOM_TABLE AtomTable,
1474 RtlMultiByteToUnicodeN (
1475 PWCHAR UnicodeString,
1484 RtlMultiByteToUnicodeSize (
1492 RtlNtStatusToDosError (
1498 RtlNtStatusToDosErrorNoTeb (
1504 RtlNtStatusToPsxErrno (
1510 RtlNumberGenericTableElements (
1511 IN PRTL_GENERIC_TABLE Table
1516 RtlNumberOfClearBits (
1517 PRTL_BITMAP BitMapHeader
1522 RtlNumberOfSetBits (
1523 PRTL_BITMAP BitMapHeader
1528 RtlOemStringToUnicodeSize (
1529 POEM_STRING AnsiString
1534 RtlOemStringToUnicodeString (
1535 PUNICODE_STRING DestinationString,
1536 POEM_STRING SourceString,
1537 BOOLEAN AllocateDestinationString
1543 PWCHAR UnicodeString,
1551 RtlPinAtomInAtomTable (
1552 IN PRTL_ATOM_TABLE AtomTable,
1559 PANSI_STRING String1,
1560 PANSI_STRING String2,
1561 BOOLEAN CaseInsensitive
1566 RtlPrefixUnicodeString (
1567 PUNICODE_STRING String1,
1568 PUNICODE_STRING String2,
1569 BOOLEAN CaseInsensitive
1574 RtlQueryAtomInAtomTable (
1575 IN PRTL_ATOM_TABLE AtomTable,
1577 IN OUT PULONG RefCount OPTIONAL,
1578 IN OUT PULONG PinCount OPTIONAL,
1579 IN OUT PWSTR AtomName OPTIONAL,
1580 IN OUT PULONG NameLength OPTIONAL
1585 RtlQueryTimeZoneInformation (
1586 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1592 IN PEXCEPTION_RECORD ExceptionRecord
1605 RtlReserveChunk(IN USHORT CompressionFormat,
1606 IN OUT PUCHAR *CompressedBuffer,
1607 IN PUCHAR EndOfCompressedBufferPlus1,
1608 OUT PUCHAR *ChunkBuffer,
1609 IN ULONG ChunkSize);
1613 * RtlRetrieveUlong (
1614 * PULONG DestinationAddress,
1615 * PULONG SourceAddress
1618 #define RtlRetrieveUlong(DestAddress,SrcAddress) \
1619 if ((ULONG)(SrcAddress) & LONG_MASK) \
1621 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1622 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1623 ((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
1624 ((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
1628 *((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
1633 * RtlRetrieveUshort (
1634 * PUSHORT DestinationAddress,
1635 * PUSHORT SourceAddress
1638 #define RtlRetrieveUshort(DestAddress,SrcAddress) \
1639 if ((ULONG)(SrcAddress) & SHORT_MASK) \
1641 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1642 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1646 *((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
1651 RtlSecondsSince1970ToTime (
1652 ULONG SecondsSince1970,
1658 RtlSecondsSince1980ToTime (
1659 ULONG SecondsSince1980,
1666 IN PRTL_BITMAP BitMapHeader
1672 PRTL_BITMAP BitMapHeader,
1673 ULONG StartingIndex,
1679 RtlSetDaclSecurityDescriptor (
1680 PSECURITY_DESCRIPTOR SecurityDescriptor,
1681 BOOLEAN DaclPresent,
1683 BOOLEAN DaclDefaulted
1688 RtlSetTimeZoneInformation (
1689 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1707 #define RtlStoreUlong(Address,Value) \
1708 if ((ULONG)(Address) & LONG_MASK) \
1710 ((PUCHAR)(Address))[LONG_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1711 ((PUCHAR)(Address))[LONG_3RD_MOST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1712 ((PUCHAR)(Address))[LONG_2ND_MOST_SIGNIFICANT_BIT]=(UCHAR)(THIRDBYTE(Value)); \
1713 ((PUCHAR)(Address))[LONG_MOST_SIGNIFICANT_BIT]=(UCHAR)(FOURTHBYTE(Value)); \
1717 *((PULONG)(Address))=(ULONG)(Value); \
1727 #define RtlStoreUshort(Address,Value) \
1728 if ((ULONG)(Address) & SHORT_MASK) \
1730 ((PUCHAR)(Address))[SHORT_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1731 ((PUCHAR)(Address))[SHORT_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
1735 *((PUSHORT)(Address))=(USHORT)(Value); \
1740 RtlTimeFieldsToTime (
1741 PTIME_FIELDS TimeFields,
1747 RtlTimeToSecondsSince1970 (
1748 PLARGE_INTEGER Time,
1749 PULONG SecondsSince1970
1754 RtlTimeToSecondsSince1980 (
1755 PLARGE_INTEGER Time,
1756 PULONG SecondsSince1980
1761 RtlTimeToTimeFields (
1762 PLARGE_INTEGER Time,
1763 PTIME_FIELDS TimeFields
1768 RtlUnicodeStringToAnsiSize (
1769 IN PUNICODE_STRING UnicodeString
1774 RtlUnicodeStringToAnsiString (
1775 IN OUT PANSI_STRING DestinationString,
1776 IN PUNICODE_STRING SourceString,
1777 IN BOOLEAN AllocateDestinationString
1782 RtlUnicodeStringToInteger (
1783 IN PUNICODE_STRING String,
1790 RtlUnicodeStringToOemSize (
1791 IN PUNICODE_STRING UnicodeString
1796 RtlUnicodeStringToCountedOemString (
1797 IN OUT POEM_STRING DestinationString,
1798 IN PUNICODE_STRING SourceString,
1799 IN BOOLEAN AllocateDestinationString
1804 RtlUnicodeStringToOemString (
1805 IN OUT POEM_STRING DestinationString,
1806 IN PUNICODE_STRING SourceString,
1807 IN BOOLEAN AllocateDestinationString
1812 RtlUnicodeToCustomCPN (
1813 PRTL_NLS_DATA NlsData,
1817 PWCHAR UnicodeString,
1823 RtlUnicodeToMultiByteN (
1827 PWCHAR UnicodeString,
1833 RtlUnicodeToMultiByteSize (
1835 PWCHAR UnicodeString,
1845 PWCHAR UnicodeString,
1858 PEXCEPTION_REGISTRATION RegistrationFrame,
1859 PVOID ReturnAddress,
1860 PEXCEPTION_RECORD ExceptionRecord,
1866 RtlUpcaseUnicodeChar (
1872 RtlUpcaseUnicodeString (
1873 IN OUT PUNICODE_STRING DestinationString,
1874 IN PUNICODE_STRING SourceString,
1875 IN BOOLEAN AllocateDestinationString
1880 RtlUpcaseUnicodeStringToAnsiString (
1881 IN OUT PANSI_STRING DestinationString,
1882 IN PUNICODE_STRING SourceString,
1883 IN BOOLEAN AllocateDestinationString
1888 RtlUpcaseUnicodeStringToCountedOemString (
1889 IN OUT POEM_STRING DestinationString,
1890 IN PUNICODE_STRING SourceString,
1891 IN BOOLEAN AllocateDestinationString
1896 RtlUpcaseUnicodeStringToOemString (
1897 IN OUT POEM_STRING DestinationString,
1898 IN PUNICODE_STRING SourceString,
1899 IN BOOLEAN AllocateDestinationString
1904 RtlUpcaseUnicodeToCustomCPN (
1905 PRTL_NLS_DATA NlsData,
1909 PWCHAR UnicodeString,
1915 RtlUpcaseUnicodeToMultiByteN (
1919 PWCHAR UnicodeString,
1925 RtlUpcaseUnicodeToOemN (
1929 PWCHAR UnicodeString,
1942 PSTRING DestinationString,
1943 PSTRING SourceString
1956 RtlValidSecurityDescriptor (
1957 PSECURITY_DESCRIPTOR SecurityDescriptor
1961 RtlValidSid(IN PSID Sid);
1965 RtlxAnsiStringToUnicodeSize (
1966 IN PANSI_STRING AnsiString
1971 RtlxOemStringToUnicodeSize (
1972 IN POEM_STRING OemString
1977 RtlxUnicodeStringToAnsiSize (
1978 IN PUNICODE_STRING UnicodeString
1983 RtlxUnicodeStringToOemSize (
1984 IN PUNICODE_STRING UnicodeString
1988 /* Register io functions */
1992 READ_REGISTER_UCHAR (
1998 READ_REGISTER_USHORT (
2004 READ_REGISTER_ULONG (
2010 READ_REGISTER_BUFFER_UCHAR (
2018 READ_REGISTER_BUFFER_USHORT (
2026 READ_REGISTER_BUFFER_ULONG (
2034 WRITE_REGISTER_UCHAR (
2041 WRITE_REGISTER_USHORT (
2048 WRITE_REGISTER_ULONG (
2055 WRITE_REGISTER_BUFFER_UCHAR (
2063 WRITE_REGISTER_BUFFER_USHORT (
2071 WRITE_REGISTER_BUFFER_ULONG (
2078 NTSTATUS STDCALL RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision);
2079 NTSTATUS STDCALL RtlQueryInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
2080 NTSTATUS STDCALL RtlSetInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
2081 BOOLEAN STDCALL RtlValidAcl (PACL Acl);
2083 NTSTATUS STDCALL RtlAddAccessAllowedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
2084 NTSTATUS STDCALL RtlAddAccessDeniedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
2085 NTSTATUS STDCALL RtlAddAce(PACL Acl, ULONG Revision, ULONG StartingIndex, PACE AceList, ULONG AceListLength);
2086 NTSTATUS STDCALL RtlAddAuditAccessAce (PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid, BOOLEAN Success, BOOLEAN Failure);
2087 NTSTATUS STDCALL RtlDeleteAce(PACL Acl, ULONG AceIndex);
2088 BOOLEAN STDCALL RtlFirstFreeAce(PACL Acl, PACE* Ace);
2089 NTSTATUS STDCALL RtlGetAce(PACL Acl, ULONG AceIndex, PACE *Ace);
2091 NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
2092 NTSTATUS STDCALL RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
2093 NTSTATUS STDCALL RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG Revision);
2094 BOOLEAN STDCALL RtlValidSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
2095 ULONG STDCALL RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
2096 NTSTATUS STDCALL RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN DaclPresent, PACL Dacl, BOOLEAN DaclDefaulted);
2097 NTSTATUS STDCALL RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN DaclPresent, PACL* Dacl, PBOOLEAN DaclDefauted);
2098 NTSTATUS STDCALL RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Owner, BOOLEAN OwnerDefaulted);
2099 NTSTATUS STDCALL RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Owner, PBOOLEAN OwnerDefaulted);
2100 NTSTATUS STDCALL RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Group, BOOLEAN GroupDefaulted);
2101 NTSTATUS STDCALL RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Group, PBOOLEAN GroupDefaulted);
2102 NTSTATUS STDCALL RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSECURITY_DESCRIPTOR_CONTROL Control, PULONG Revision);
2103 NTSTATUS STDCALL RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN SaclPresent, PACL Sacl, BOOLEAN SaclDefaulted);
2104 NTSTATUS STDCALL RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN SaclPresent, PACL* Sacl, PBOOLEAN SaclDefauted);
2105 NTSTATUS STDCALL RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD,
2106 PSECURITY_DESCRIPTOR AbsSD,
2117 NTSTATUS STDCALL RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
2118 UCHAR SubAuthorityCount,
2119 ULONG SubAuthority0,
2120 ULONG SubAuthority1,
2121 ULONG SubAuthority2,
2122 ULONG SubAuthority3,
2123 ULONG SubAuthority4,
2124 ULONG SubAuthority5,
2125 ULONG SubAuthority6,
2126 ULONG SubAuthority7,
2128 ULONG STDCALL RtlLengthRequiredSid (UCHAR SubAuthorityCount);
2129 PSID_IDENTIFIER_AUTHORITY STDCALL RtlIdentifierAuthoritySid (PSID Sid);
2130 NTSTATUS STDCALL RtlInitializeSid (PSID Sid, PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, UCHAR SubAuthorityCount);
2131 PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
2132 BOOLEAN STDCALL RtlEqualPrefixSid (PSID Sid1, PSID Sid2);
2133 BOOLEAN STDCALL RtlEqualSid(PSID Sid1, PSID Sid2);
2134 PSID STDCALL RtlFreeSid (PSID Sid);
2135 ULONG STDCALL RtlLengthSid (PSID Sid);
2136 PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
2137 PUCHAR STDCALL RtlSubAuthorityCountSid (PSID Sid);
2138 BOOLEAN STDCALL RtlValidSid (PSID Sid);
2139 NTSTATUS STDCALL RtlConvertSidToUnicodeString (PUNICODE_STRING String, PSID Sid, BOOLEAN AllocateBuffer);
2141 BOOLEAN STDCALL RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
2142 BOOLEAN STDCALL RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
2143 VOID STDCALL RtlMapGenericMask (PACCESS_MASK AccessMask, PGENERIC_MAPPING GenericMapping);
2146 /* functions exported from NTOSKRNL.EXE which are considered RTL */
2148 #if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
2150 char *_itoa (int value, char *string, int radix);
2151 int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
2152 int _snwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, ...);
2153 int _stricmp(const char *s1, const char *s2);
2154 char * _strlwr(char *x);
2155 int _strnicmp(const char *s1, const char *s2, size_t n);
2156 char * _strnset(char* szToFill, int szFill, size_t sizeMaxFill);
2157 char * _strrev(char *s);
2158 char * _strset(char* szToFill, int szFill);
2159 char * _strupr(char *x);
2160 int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args);
2161 int _wcsicmp (const wchar_t* cs, const wchar_t* ct);
2162 wchar_t * _wcslwr (wchar_t *x);
2163 int _wcsnicmp (const wchar_t * cs,const wchar_t * ct,size_t count);
2164 wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
2165 wchar_t * _wcsrev(wchar_t *s);
2166 wchar_t *_wcsupr(wchar_t *x);
2168 int atoi(const char *str);
2169 long atol(const char *str);
2175 int isxdigit(int c);
2176 size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count);
2177 int mbtowc (wchar_t *wchar, const char *mbchar, size_t count);
2178 void * memchr(const void *s, int c, size_t n);
2179 void * memcpy(void *to, const void *from, size_t count);
2180 void * memmove(void *dest,const void *src, size_t count);
2181 void * memset(void *src, int val, size_t count);
2188 int sprintf(char * buf, const char *fmt, ...);
2189 void srand(unsigned seed);
2190 char * strcat(char *s, const char *append);
2191 char * strchr(const char *s, int c);
2192 int strcmp(const char *s1, const char *s2);
2193 char * strcpy(char *to, const char *from);
2194 size_t strlen(const char *str);
2195 char * strncat(char *dst, const char *src, size_t n);
2196 int strncmp(const char *s1, const char *s2, size_t n);
2197 char *strncpy(char *dst, const char *src, size_t n);
2198 char *strrchr(const char *s, int c);
2199 size_t strspn(const char *s1, const char *s2);
2200 char *strstr(const char *s, const char *find);
2201 int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
2204 wchar_t towlower(wchar_t c);
2205 wchar_t towupper(wchar_t c);
2206 int vsprintf(char *buf, const char *fmt, va_list args);
2207 wchar_t * wcscat(wchar_t *dest, const wchar_t *src);
2208 wchar_t * wcschr(const wchar_t *str, wchar_t ch);
2209 int wcscmp(const wchar_t *cs, const wchar_t *ct);
2210 wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2);
2211 size_t wcscspn(const wchar_t *str,const wchar_t *reject);
2212 size_t wcslen(const wchar_t *s);
2213 wchar_t * wcsncat(wchar_t *dest, const wchar_t *src, size_t count);
2214 int wcsncmp(const wchar_t *cs, const wchar_t *ct, size_t count);
2215 wchar_t * wcsncpy(wchar_t *dest, const wchar_t *src, size_t count);
2216 wchar_t * wcsrchr(const wchar_t *str, wchar_t ch);
2217 size_t wcsspn(const wchar_t *str,const wchar_t *accept);
2218 wchar_t *wcsstr(const wchar_t *s,const wchar_t *b);
2219 size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count);
2220 int wctomb (char *mbchar, wchar_t wchar);
2222 #endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
2224 #endif /* __DDK_RTL_H */