8 #if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined (__NTAPP__)
13 #endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
20 * PURPOSE: Flags for RtlQueryRegistryValues
22 #define RTL_QUERY_REGISTRY_SUBKEY (0x00000001)
23 #define RTL_QUERY_REGISTRY_TOPKEY (0x00000002)
24 #define RTL_QUERY_REGISTRY_REQUIRED (0x00000004)
25 #define RTL_QUERY_REGISTRY_NOVALUE (0x00000008)
26 #define RTL_QUERY_REGISTRY_NOEXPAND (0x00000010)
27 #define RTL_QUERY_REGISTRY_DIRECT (0x00000020)
28 #define RTL_QUERY_REGISTRY_DELETE (0x00000040)
32 * PURPOSE: Used with RtlCheckRegistryKey, RtlCreateRegistryKey,
33 * RtlDeleteRegistryKey
35 #define RTL_REGISTRY_ABSOLUTE 0
36 #define RTL_REGISTRY_SERVICES 1
37 #define RTL_REGISTRY_CONTROL 2
38 #define RTL_REGISTRY_WINDOWS_NT 3
39 #define RTL_REGISTRY_DEVICEMAP 4
40 #define RTL_REGISTRY_USER 5
41 #define RTL_REGISTRY_ENUM 6 // ReactOS specific: Used internally in kernel only
42 #define RTL_REGISTRY_MAXIMUM 7
44 #define RTL_REGISTRY_HANDLE 0x40000000
45 #define RTL_REGISTRY_OPTIONAL 0x80000000
48 #define SHORT_SIZE (sizeof(USHORT))
49 #define SHORT_MASK (SHORT_SIZE-1)
50 #define LONG_SIZE (sizeof(ULONG))
51 #define LONG_MASK (LONG_SIZE-1)
52 #define LOWBYTE_MASK 0x00FF
54 #define FIRSTBYTE(Value) ((Value) & LOWBYTE_MASK)
55 #define SECONDBYTE(Value) (((Value) >> 8) & LOWBYTE_MASK)
56 #define THIRDBYTE(Value) (((Value) >> 16) & LOWBYTE_MASK)
57 #define FOURTHBYTE(Value) (((Value) >> 24) & LOWBYTE_MASK)
59 /* FIXME: reverse byte-order on big-endian machines (e.g. MIPS) */
60 #define SHORT_LEAST_SIGNIFICANT_BIT 0
61 #define SHORT_MOST_SIGNIFICANT_BIT 1
63 #define LONG_LEAST_SIGNIFICANT_BIT 0
64 #define LONG_3RD_MOST_SIGNIFICANT_BIT 1
65 #define LONG_2RD_MOST_SIGNIFICANT_BIT 2
66 #define LONG_MOST_SIGNIFICANT_BIT 3
70 #if defined(__NTOSKRNL__) || defined(__NTDLL__)
71 #define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
72 #define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
74 #define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag)
75 #define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag)
76 #endif /* __NTOSKRNL__ || __NTDLL__ */
78 extern BOOLEAN NLS_MB_CODE_PAGE_TAG;
79 extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
83 * NOTE: ReactOS extensions
85 #define RtlMin(X,Y) (((X) < (Y))? (X) : (Y))
86 #define RtlMax(X,Y) (((X) > (Y))? (X) : (Y))
87 #define RtlMin3(X,Y,Z) (((X) < (Y)) ? RtlMin(X,Z) : RtlMin(Y,Z))
88 #define RtlMax3(X,Y,Z) (((X) > (Y)) ? RtlMax(X,Z) : RtlMax(Y,Z))
93 * InitializeObjectAttributes (
94 * POBJECT_ATTRIBUTES InitializedAttributes,
95 * PUNICODE_STRING ObjectName,
97 * HANDLE RootDirectory,
98 * PSECURITY_DESCRIPTOR SecurityDescriptor
101 * FUNCTION: Sets up a parameter of type OBJECT_ATTRIBUTES for a
102 * subsequent call to ZwCreateXXX or ZwOpenXXX
104 * InitializedAttributes (OUT) = Caller supplied storage for the
106 * ObjectName = Full path name for object
107 * Attributes = Attributes for the object
108 * RootDirectory = Where the object should be placed or NULL
109 * SecurityDescriptor = Ignored
111 #define InitializeObjectAttributes(p,n,a,r,s) \
113 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
114 (p)->ObjectName = n; \
115 (p)->Attributes = a; \
116 (p)->RootDirectory = r; \
117 (p)->SecurityDescriptor = s; \
118 (p)->SecurityQualityOfService = NULL; \
124 * InitializeListHead (
125 * PLIST_ENTRY ListHead
128 * FUNCTION: Initializes a double linked list
130 * ListHead = Caller supplied storage for the head of the list
132 #define InitializeListHead(ListHead) \
134 (ListHead)->Flink = (ListHead); \
135 (ListHead)->Blink = (ListHead); \
142 * PLIST_ENTRY ListHead,
146 * FUNCTION: Inserts an entry in a double linked list
148 * ListHead = Head of the list
149 * Entry = Entry to insert
151 #define InsertHeadList(ListHead, ListEntry) \
153 PLIST_ENTRY OldFlink; \
154 OldFlink = (ListHead)->Flink; \
155 (ListEntry)->Flink = OldFlink; \
156 (ListEntry)->Blink = (ListHead); \
157 OldFlink->Blink = (ListEntry); \
158 (ListHead)->Flink = (ListEntry); \
159 assert((ListEntry) != NULL); \
160 assert((ListEntry)->Blink!=NULL); \
161 assert((ListEntry)->Blink->Flink == (ListEntry)); \
162 assert((ListEntry)->Flink != NULL); \
163 assert((ListEntry)->Flink->Blink == (ListEntry)); \
170 * PLIST_ENTRY ListHead,
175 * Inserts an entry in a double linked list
178 * ListHead = Head of the list
179 * Entry = Entry to insert
181 #define InsertTailList(ListHead, ListEntry) \
183 PLIST_ENTRY OldBlink; \
184 OldBlink = (ListHead)->Blink; \
185 (ListEntry)->Flink = (ListHead); \
186 (ListEntry)->Blink = OldBlink; \
187 OldBlink->Flink = (ListEntry); \
188 (ListHead)->Blink = (ListEntry); \
189 assert((ListEntry) != NULL); \
190 assert((ListEntry)->Blink != NULL); \
191 assert((ListEntry)->Blink->Flink == (ListEntry)); \
192 assert((ListEntry)->Flink != NULL); \
193 assert((ListEntry)->Flink->Blink == (ListEntry)); \
199 * PLIST_ENTRY ListHead
203 * Checks if a double linked list is empty
206 * ListHead = Head of the list
208 #define IsListEmpty(ListHead) \
209 ((ListHead)->Flink == (ListHead))
215 * PSINGLE_LIST_ENTRY ListHead
219 * Removes an entry from the head of a single linked list
222 * ListHead = Head of the list
228 #define PopEntryList(ListHead) \
231 PSINGLE_LIST_ENTRY FirstEntry; \
232 FirstEntry = (ListHead)->Next; \
233 if (FirstEntry != NULL) \
235 (ListHead)->Next = FirstEntry->Next; \
243 PSINGLE_LIST_ENTRY ListHead
246 PSINGLE_LIST_ENTRY ListEntry;
248 ListEntry = ListHead->Next;
251 ListHead->Next = ListEntry->Next;
259 PSINGLE_LIST_ENTRY ListHead,
260 PSINGLE_LIST_ENTRY Entry
264 #define PushEntryList(ListHead,Entry) \
265 (Entry)->Next = (ListHead)->Next; \
266 (ListHead)->Next = (Entry)
272 PSINGLE_LIST_ENTRY ListHead,
273 PSINGLE_LIST_ENTRY Entry
276 Entry->Next = ListHead->Next;
277 ListHead->Next = Entry;
282 * An ReactOS extension
288 PSLIST_HEADER ListHead
291 PSINGLE_LIST_ENTRY ListEntry;
293 ListEntry = ListHead->s.Next.Next;
296 ListHead->s.Next.Next = ListEntry->Next;
298 ListHead->s.Sequence++;
305 * An ReactOS extension
311 PSLIST_HEADER ListHead,
312 PSINGLE_LIST_ENTRY Entry
315 Entry->Next = ListHead->s.Next.Next;
316 ListHead->s.Next.Next = Entry;
318 ListHead->s.Sequence++;
329 * Removes an entry from a double linked list
332 * ListEntry = Entry to remove
334 #define RemoveEntryList(ListEntry) \
336 PLIST_ENTRY OldFlink; \
337 PLIST_ENTRY OldBlink; \
338 assert((ListEntry) != NULL); \
339 assert((ListEntry)->Blink!=NULL); \
340 assert((ListEntry)->Blink->Flink == (ListEntry)); \
341 assert((ListEntry)->Flink != NULL); \
342 assert((ListEntry)->Flink->Blink == (ListEntry)); \
343 OldFlink = (ListEntry)->Flink; \
344 OldBlink = (ListEntry)->Blink; \
345 OldFlink->Blink = OldBlink; \
346 OldBlink->Flink = OldFlink; \
347 (ListEntry)->Flink = NULL; \
348 (ListEntry)->Blink = NULL; \
355 * PLIST_ENTRY ListHead
359 * Removes the head entry from a double linked list
362 * ListHead = Head of the list
368 #define RemoveHeadList(ListHead) \
370 {RemoveEntryList((ListHead)->Flink)}
387 PLIST_ENTRY OldFlink;
388 PLIST_ENTRY OldBlink;
390 Old = ListHead->Flink;
392 OldFlink = ListHead->Flink->Flink;
393 OldBlink = ListHead->Flink->Blink;
394 OldFlink->Blink = OldBlink;
395 OldBlink->Flink = OldFlink;
409 * PLIST_ENTRY ListHead
413 * Removes the tail entry from a double linked list
416 * ListHead = Head of the list
422 #define RemoveTailList(ListHead) \
424 {RemoveEntryList((ListHead)->Blink)}
441 PLIST_ENTRY OldFlink;
442 PLIST_ENTRY OldBlink;
444 Old = ListHead->Blink;
446 OldFlink = ListHead->Blink->Flink;
447 OldBlink = ListHead->Blink->Blink;
448 OldFlink->Blink = OldBlink;
449 OldBlink->Flink = OldFlink;
462 RtlAddAtomToAtomTable (
463 IN PRTL_ATOM_TABLE AtomTable,
477 RtlAnsiCharToUnicodeChar (
483 RtlAnsiStringToUnicodeSize (
484 PANSI_STRING AnsiString
489 RtlAnsiStringToUnicodeString (
490 PUNICODE_STRING DestinationString,
491 PANSI_STRING SourceString,
492 BOOLEAN AllocateDestinationString
497 RtlAppendAsciizToString(
504 RtlAppendStringToString (
511 RtlAppendUnicodeStringToString (
512 PUNICODE_STRING Destination,
513 PUNICODE_STRING Source
518 RtlAppendUnicodeToString (
519 PUNICODE_STRING Destination,
526 PRTL_BITMAP BitMapHeader,
534 PRTL_BITMAP BitMapHeader,
542 PVOID FailedAssertion,
558 RtlCheckRegistryKey (
566 IN PRTL_BITMAP BitMapHeader
572 IN PRTL_BITMAP BitMapHeader,
573 IN ULONG StartingIndex,
574 IN ULONG NumberToClear
597 BOOLEAN CaseInsensitive
602 RtlCompareUnicodeString (
603 PUNICODE_STRING String1,
604 PUNICODE_STRING String2,
605 BOOLEAN BaseInsensitive
609 RtlCompressBuffer(IN USHORT CompressionFormatAndEngine,
610 IN PUCHAR UncompressedBuffer,
611 IN ULONG UncompressedBufferSize,
612 OUT PUCHAR CompressedBuffer,
613 IN ULONG CompressedBufferSize,
614 IN ULONG UncompressedChunkSize,
615 OUT PULONG FinalCompressedSize,
619 RtlCompressChunks(IN PUCHAR UncompressedBuffer,
620 IN ULONG UncompressedBufferSize,
621 OUT PUCHAR CompressedBuffer,
622 IN ULONG CompressedBufferSize,
623 IN OUT PCOMPRESSED_DATA_INFO CompressedDataInfo,
624 IN ULONG CompressedDataInfoLength,
627 LARGE_INTEGER STDCALL
628 RtlConvertLongToLargeInteger(IN LONG SignedInteger);
631 RtlConvertSidToUnicodeString(IN OUT PUNICODE_STRING String,
633 IN BOOLEAN AllocateString);
635 LARGE_INTEGER STDCALL
636 RtlConvertUlongToLargeInteger(IN ULONG UnsignedInteger);
654 #define RtlCopyMemory(Destination,Source,Length) \
655 memcpy((Destination),(Source),(Length))
657 #define RtlCopyBytes RtlCopyMemory
660 RtlCopyLuid(IN PLUID LuidDest,
664 RtlCopyLuidAndAttributesArray(ULONG Count,
665 PLUID_AND_ATTRIBUTES Src,
666 PLUID_AND_ATTRIBUTES Dest);
669 RtlCopySid(ULONG BufferLength,
674 RtlCopySidAndAttributesArray(ULONG Count,
675 PSID_AND_ATTRIBUTES Src,
677 PSID_AND_ATTRIBUTES Dest,
679 PVOID* RemainingSidArea,
680 PULONG RemainingSidAreaSize);
683 RtlCopyString(PSTRING DestinationString,
684 PSTRING SourceString);
687 RtlCopyUnicodeString(PUNICODE_STRING DestinationString,
688 PUNICODE_STRING SourceString);
691 RtlCreateAtomTable(IN ULONG TableSize,
692 IN OUT PRTL_ATOM_TABLE *AtomTable);
702 PRTL_HEAP_DEFINITION Definition
707 RtlCreateRegistryKey (
714 RtlCreateSecurityDescriptor (
715 PSECURITY_DESCRIPTOR SecurityDescriptor,
721 RtlCreateUnicodeString (
722 OUT PUNICODE_STRING Destination,
727 RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
732 RtlCustomCPToUnicodeN (
733 PRTL_NLS_DATA NlsData,
734 PWCHAR UnicodeString,
742 RtlDecompressBuffer(IN USHORT CompressionFormat,
743 OUT PUCHAR UncompressedBuffer,
744 IN ULONG UncompressedBufferSize,
745 IN PUCHAR CompressedBuffer,
746 IN ULONG CompressedBufferSize,
747 OUT PULONG FinalUncompressedSize);
750 RtlDecompressChunks(OUT PUCHAR UncompressedBuffer,
751 IN ULONG UncompressedBufferSize,
752 IN PUCHAR CompressedBuffer,
753 IN ULONG CompressedBufferSize,
754 IN PUCHAR CompressedTail,
755 IN ULONG CompressedTailSize,
756 IN PCOMPRESSED_DATA_INFO CompressedDataInfo);
759 RtlDecompressFragment(IN USHORT CompressionFormat,
760 OUT PUCHAR UncompressedFragment,
761 IN ULONG UncompressedFragmentSize,
762 IN PUCHAR CompressedBuffer,
763 IN ULONG CompressedBufferSize,
764 IN ULONG FragmentOffset,
765 OUT PULONG FinalUncompressedSize,
769 RtlDeleteAtomFromAtomTable(IN PRTL_ATOM_TABLE AtomTable,
773 RtlDeleteRegistryValue(IN ULONG RelativeTo,
778 RtlDescribeChunk(IN USHORT CompressionFormat,
779 IN OUT PUCHAR *CompressedBuffer,
780 IN PUCHAR EndOfCompressedBufferPlus1,
781 OUT PUCHAR *ChunkBuffer,
782 OUT PULONG ChunkSize);
785 RtlDestroyAtomTable(IN PRTL_ATOM_TABLE AtomTable);
788 RtlDestroyHeap(HANDLE hheap);
792 RtlDowncaseUnicodeString (
793 IN OUT PUNICODE_STRING DestinationString,
794 IN PUNICODE_STRING SourceString,
795 IN BOOLEAN AllocateDestinationString
801 IN PRTL_ATOM_TABLE AtomTable,
802 IN BOOLEAN DeletePinned
807 RtlEnlargedIntegerMultiply (
814 RtlEnlargedUnsignedDivide (
815 ULARGE_INTEGER Dividend,
822 RtlEnlargedUnsignedMultiply (
828 RtlEqualLuid(IN PLUID Luid1,
836 BOOLEAN CaseInSensitive
841 RtlEqualUnicodeString (
842 PUNICODE_STRING String1,
843 PUNICODE_STRING String2,
844 BOOLEAN CaseInSensitive
849 RtlExtendedIntegerMultiply (
850 LARGE_INTEGER Multiplicand,
856 RtlExtendedLargeIntegerDivide (
857 LARGE_INTEGER Dividend,
864 RtlExtendedMagicDivide (
865 LARGE_INTEGER Dividend,
866 LARGE_INTEGER MagicDivisor,
889 PRTL_BITMAP BitMapHeader,
896 RtlFindClearBitsAndSet (
897 PRTL_BITMAP BitMapHeader,
904 RtlFindFirstRunClear (
905 PRTL_BITMAP BitMapHeader,
912 PRTL_BITMAP BitMapHeader,
918 RtlFindLongestRunClear (
919 PRTL_BITMAP BitMapHeader,
925 RtlFindLongestRunSet (
926 PRTL_BITMAP BitMapHeader,
933 IN PVOID BaseAddress,
937 OUT PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry
943 PRTL_BITMAP BitMapHeader,
950 RtlFindSetBitsAndClear (
951 PRTL_BITMAP BitMapHeader,
958 RtlFormatCurrentUserKeyPath (
959 IN OUT PUNICODE_STRING KeyPath
965 PANSI_STRING AnsiString
979 POEM_STRING OemString
984 RtlFreeUnicodeString (
985 PUNICODE_STRING UnicodeString
989 RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
990 IN BOOLEAN AllowExtendedCharacters,
991 IN OUT PGENERATE_NAME_CONTEXT Context,
992 OUT PUNICODE_STRING Name8dot3);
995 RtlGetCallersAddress (
996 PVOID * CallersAddress
1000 RtlGetCompressionWorkSpaceSize(IN USHORT CompressionFormatAndEngine,
1001 OUT PULONG CompressBufferAndWorkSpaceSize,
1002 OUT PULONG CompressFragmentWorkSpaceSize);
1006 RtlGetDefaultCodePage (
1007 PUSHORT AnsiCodePage,
1011 #define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
1015 RtlImageDirectoryEntryToData (
1028 PIMAGE_SECTION_HEADER
1030 RtlImageRvaToSection (
1031 PIMAGE_NT_HEADERS NtHeader,
1039 PIMAGE_NT_HEADERS NtHeader,
1042 PIMAGE_SECTION_HEADER *SectionHeader
1048 PANSI_STRING DestinationString,
1055 PSTRING DestinationString,
1061 RtlInitUnicodeString (
1062 PUNICODE_STRING DestinationString,
1068 InitializeUnicodeString (
1069 PUNICODE_STRING DestinationString,
1071 USHORT MaximumLength,
1075 Initialize an UNICODE_STRING from its fields. Use when you know the values of
1076 all the fields in advance
1080 #define InitializeUnicodeString(__PDEST_STRING__,__LENGTH__,__MAXLENGTH__,__BUFFER__) \
1082 (__PDEST_STRING__)->Length = (__LENGTH__); \
1083 (__PDEST_STRING__)->MaximumLength = (__MAXLENGTH__); \
1084 (__PDEST_STRING__)->Buffer = (__BUFFER__); \
1089 RtlInitUnicodeStringFromLiteral (
1090 PUNICODE_STRING DestinationString,
1094 Initialize an UNICODE_STRING from a wide string literal. WARNING: use only with
1095 string literals and statically initialized arrays, it will calculate the wrong
1100 /* Prevent hide of the inappropriate passed type by our
1101 * de"const" of the string in the macro below.
1103 static inline const WCHAR *_RtlInitUnicodeStringFromLiteral_typecheck(const WCHAR *s) { return s; }
1105 #define RtlInitUnicodeStringFromLiteral(__PDEST_STRING__,__SOURCE_STRING__) \
1106 InitializeUnicodeString( \
1107 (__PDEST_STRING__), \
1108 sizeof(__SOURCE_STRING__) - sizeof(WCHAR), \
1109 sizeof(__SOURCE_STRING__), \
1110 (WCHAR * /* de"const" the string here */ )_RtlInitUnicodeStringFromLiteral_typecheck((__SOURCE_STRING__)) \
1114 Static initializer for UNICODE_STRING variables. Usage:
1116 UNICODE_STRING wstr = UNICODE_STRING_INITIALIZER(L"string");
1120 #define UNICODE_STRING_INITIALIZER(__SOURCE_STRING__) \
1122 sizeof((__SOURCE_STRING__)) - sizeof(WCHAR), \
1123 sizeof((__SOURCE_STRING__)), \
1124 (__SOURCE_STRING__) \
1128 Initializer for empty UNICODE_STRING variables. Usage:
1130 UNICODE_STRING wstr = EMPTY_UNICODE_STRING;
1133 #define EMPTY_UNICODE_STRING {0, 0, NULL}
1137 RtlInitializeBitMap (
1138 IN OUT PRTL_BITMAP BitMapHeader,
1139 IN PULONG BitMapBuffer,
1140 IN ULONG SizeOfBitMap
1145 RtlInitializeContext (
1146 IN HANDLE ProcessHandle,
1147 IN PCONTEXT Context,
1149 IN PTHREAD_START_ROUTINE StartAddress,
1150 IN OUT PINITIAL_TEB InitialTeb
1155 RtlInitializeGenericTable (
1156 IN OUT PRTL_GENERIC_TABLE Table,
1157 IN PVOID CompareRoutine,
1158 IN PVOID AllocateRoutine,
1159 IN PVOID FreeRoutine,
1160 IN ULONG UserParameter
1165 RtlInsertElementGenericTable (
1166 IN OUT PRTL_GENERIC_TABLE Table,
1168 IN ULONG ElementSize,
1169 IN PBOOLEAN NewElement OPTIONAL
1174 RtlLookupElementGenericTableFull (
1175 IN OUT PRTL_GENERIC_TABLE Table,
1177 OUT PVOID *NodeOrParent,
1178 OUT TABLE_SEARCH_RESULT *SearchResult
1192 RtlIntegerToUnicodeString (
1195 IN OUT PUNICODE_STRING String
1200 RtlIsGenericTableEmpty (
1201 IN PRTL_GENERIC_TABLE Table
1205 RtlIsNameLegalDOS8Dot3(IN PUNICODE_STRING UnicodeName,
1206 IN PANSI_STRING AnsiName,
1207 OUT PBOOLEAN SpacesFound);
1211 RtlLargeIntegerAdd (
1212 LARGE_INTEGER Addend1,
1213 LARGE_INTEGER Addend2
1218 * RtlLargeIntegerAnd (
1219 * PLARGE_INTEGER Result,
1220 * LARGE_INTEGER Source,
1221 * LARGE_INTEGER Mask
1224 #define RtlLargeIntegerAnd(Result, Source, Mask) \
1226 Result.HighPart = Source.HighPart & Mask.HighPart; \
1227 Result.LowPart = Source.LowPart & Mask.LowPart; \
1232 RtlLargeIntegerArithmeticShift (
1233 LARGE_INTEGER LargeInteger,
1239 RtlLargeIntegerDivide (
1240 LARGE_INTEGER Dividend,
1241 LARGE_INTEGER Divisor,
1242 PLARGE_INTEGER Remainder
1247 * RtlLargeIntegerEqualTo (
1248 * LARGE_INTEGER Operand1,
1249 * LARGE_INTEGER Operand2
1252 #define RtlLargeIntegerEqualTo(X,Y) \
1253 (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1257 * RtlLargeIntegerEqualToZero (
1258 * LARGE_INTEGER Operand
1261 #define RtlLargeIntegerEqualToZero(X) \
1262 (!((X).LowPart | (X).HighPart))
1266 * RtlLargeIntegerGreaterThan (
1267 * LARGE_INTEGER Operand1,
1268 * LARGE_INTEGER Operand2
1271 #define RtlLargeIntegerGreaterThan(X,Y) \
1272 ((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
1273 ((X).HighPart > (Y).HighPart))
1277 * RtlLargeIntegerGreaterThanOrEqualTo (
1278 * LARGE_INTEGER Operand1,
1279 * LARGE_INTEGER Operand2
1282 #define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
1283 ((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
1284 ((X).HighPart > (Y).HighPart))
1288 * RtlLargeIntegerGreaterThanOrEqualToZero (
1289 * LARGE_INTEGER Operand1
1292 #define RtlLargeIntegerGreaterOrEqualToZero(X) \
1297 * RtlLargeIntegerGreaterThanZero (
1298 * LARGE_INTEGER Operand1
1301 #define RtlLargeIntegerGreaterThanZero(X) \
1302 ((((X).HighPart == 0) && ((X).LowPart > 0)) || \
1303 ((X).HighPart > 0 ))
1307 * RtlLargeIntegerLessThan (
1308 * LARGE_INTEGER Operand1,
1309 * LARGE_INTEGER Operand2
1312 #define RtlLargeIntegerLessThan(X,Y) \
1313 ((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
1314 ((X).HighPart < (Y).HighPart))
1318 * RtlLargeIntegerLessThanOrEqualTo (
1319 * LARGE_INTEGER Operand1,
1320 * LARGE_INTEGER Operand2
1323 #define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
1324 ((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
1325 ((X).HighPart < (Y).HighPart))
1329 * RtlLargeIntegerLessThanOrEqualToZero (
1330 * LARGE_INTEGER Operand
1333 #define RtlLargeIntegerLessOrEqualToZero(X) \
1334 (((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
1338 * RtlLargeIntegerLessThanZero (
1339 * LARGE_INTEGER Operand
1342 #define RtlLargeIntegerLessThanZero(X) \
1343 (((X).HighPart < 0))
1347 RtlLargeIntegerNegate (
1348 LARGE_INTEGER Subtrahend
1353 * RtlLargeIntegerNotEqualTo (
1354 * LARGE_INTEGER Operand1,
1355 * LARGE_INTEGER Operand2
1358 #define RtlLargeIntegerNotEqualTo(X,Y) \
1359 ((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1363 * RtlLargeIntegerNotEqualToZero (
1364 * LARGE_INTEGER Operand
1367 #define RtlLargeIntegerNotEqualToZero(X) \
1368 (((X).LowPart | (X).HighPart))
1372 RtlLargeIntegerShiftLeft (
1373 LARGE_INTEGER LargeInteger,
1379 RtlLargeIntegerShiftRight (
1380 LARGE_INTEGER LargeInteger,
1386 RtlLargeIntegerSubtract (
1387 LARGE_INTEGER Minuend,
1388 LARGE_INTEGER Subtrahend
1393 RtlLengthSecurityDescriptor (
1394 PSECURITY_DESCRIPTOR SecurityDescriptor
1405 RtlLookupAtomInAtomTable (
1406 IN PRTL_ATOM_TABLE AtomTable,
1412 RtlMoveMemory (PVOID Destination, CONST VOID* Source, ULONG Length);
1416 RtlMultiByteToUnicodeN (
1417 PWCHAR UnicodeString,
1426 RtlMultiByteToUnicodeSize (
1434 RtlNtStatusToDosError (
1440 RtlNtStatusToDosErrorNoTeb (
1446 RtlNtStatusToPsxErrno (
1452 RtlNumberGenericTableElements (
1453 IN PRTL_GENERIC_TABLE Table
1458 RtlNumberOfClearBits (
1459 PRTL_BITMAP BitMapHeader
1464 RtlNumberOfSetBits (
1465 PRTL_BITMAP BitMapHeader
1470 RtlOemStringToUnicodeSize (
1471 POEM_STRING AnsiString
1476 RtlOemStringToUnicodeString (
1477 PUNICODE_STRING DestinationString,
1478 POEM_STRING SourceString,
1479 BOOLEAN AllocateDestinationString
1485 PWCHAR UnicodeString,
1494 RtlOpenCurrentUser (
1495 IN ACCESS_MASK DesiredAccess,
1496 OUT PHANDLE KeyHandle
1500 RtlPinAtomInAtomTable (
1501 IN PRTL_ATOM_TABLE AtomTable,
1508 PANSI_STRING String1,
1509 PANSI_STRING String2,
1510 BOOLEAN CaseInsensitive
1515 RtlPrefixUnicodeString (
1516 PUNICODE_STRING String1,
1517 PUNICODE_STRING String2,
1518 BOOLEAN CaseInsensitive
1523 RtlQueryAtomInAtomTable (
1524 IN PRTL_ATOM_TABLE AtomTable,
1526 IN OUT PULONG RefCount OPTIONAL,
1527 IN OUT PULONG PinCount OPTIONAL,
1528 IN OUT PWSTR AtomName OPTIONAL,
1529 IN OUT PULONG NameLength OPTIONAL
1534 RtlQueryRegistryValues (
1535 IN ULONG RelativeTo,
1537 IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
1539 IN PVOID Environment
1544 RtlQueryTimeZoneInformation (
1545 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1551 IN PEXCEPTION_RECORD ExceptionRecord
1564 RtlReserveChunk(IN USHORT CompressionFormat,
1565 IN OUT PUCHAR *CompressedBuffer,
1566 IN PUCHAR EndOfCompressedBufferPlus1,
1567 OUT PUCHAR *ChunkBuffer,
1568 IN ULONG ChunkSize);
1572 * RtlRetrieveUlong (
1573 * PULONG DestinationAddress,
1574 * PULONG SourceAddress
1577 #define RtlRetrieveUlong(DestAddress,SrcAddress) \
1578 if ((ULONG)(SrcAddress) & LONG_MASK) \
1580 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1581 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1582 ((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
1583 ((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
1587 *((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
1592 * RtlRetrieveUshort (
1593 * PUSHORT DestinationAddress,
1594 * PUSHORT SourceAddress
1597 #define RtlRetrieveUshort(DestAddress,SrcAddress) \
1598 if ((ULONG)(SrcAddress) & SHORT_MASK) \
1600 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1601 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1605 *((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
1610 RtlSecondsSince1970ToTime (
1611 ULONG SecondsSince1970,
1617 RtlSecondsSince1980ToTime (
1618 ULONG SecondsSince1980,
1625 IN PRTL_BITMAP BitMapHeader
1631 PRTL_BITMAP BitMapHeader,
1632 ULONG StartingIndex,
1638 RtlSetDaclSecurityDescriptor (
1639 PSECURITY_DESCRIPTOR SecurityDescriptor,
1640 BOOLEAN DaclPresent,
1642 BOOLEAN DaclDefaulted
1647 RtlSetTimeZoneInformation (
1648 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1666 #define RtlStoreUlong(Address,Value) \
1667 if ((ULONG)(Address) & LONG_MASK) \
1669 ((PUCHAR)(Address))[LONG_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1670 ((PUCHAR)(Address))[LONG_3RD_MOST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1671 ((PUCHAR)(Address))[LONG_2ND_MOST_SIGNIFICANT_BIT]=(UCHAR)(THIRDBYTE(Value)); \
1672 ((PUCHAR)(Address))[LONG_MOST_SIGNIFICANT_BIT]=(UCHAR)(FOURTHBYTE(Value)); \
1676 *((PULONG)(Address))=(ULONG)(Value); \
1686 #define RtlStoreUshort(Address,Value) \
1687 if ((ULONG)(Address) & SHORT_MASK) \
1689 ((PUCHAR)(Address))[SHORT_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1690 ((PUCHAR)(Address))[SHORT_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
1694 *((PUSHORT)(Address))=(USHORT)(Value); \
1699 RtlTimeFieldsToTime (
1700 PTIME_FIELDS TimeFields,
1706 RtlTimeToSecondsSince1970 (
1707 PLARGE_INTEGER Time,
1708 PULONG SecondsSince1970
1713 RtlTimeToSecondsSince1980 (
1714 PLARGE_INTEGER Time,
1715 PULONG SecondsSince1980
1720 RtlTimeToTimeFields (
1721 PLARGE_INTEGER Time,
1722 PTIME_FIELDS TimeFields
1727 RtlUnicodeStringToAnsiSize (
1728 IN PUNICODE_STRING UnicodeString
1733 RtlUnicodeStringToAnsiString (
1734 IN OUT PANSI_STRING DestinationString,
1735 IN PUNICODE_STRING SourceString,
1736 IN BOOLEAN AllocateDestinationString
1741 RtlUnicodeStringToInteger (
1742 IN PUNICODE_STRING String,
1749 RtlUnicodeStringToOemSize (
1750 IN PUNICODE_STRING UnicodeString
1755 RtlUnicodeStringToCountedOemString (
1756 IN OUT POEM_STRING DestinationString,
1757 IN PUNICODE_STRING SourceString,
1758 IN BOOLEAN AllocateDestinationString
1763 RtlUnicodeStringToOemString (
1764 IN OUT POEM_STRING DestinationString,
1765 IN PUNICODE_STRING SourceString,
1766 IN BOOLEAN AllocateDestinationString
1771 RtlUnicodeToCustomCPN (
1772 PRTL_NLS_DATA NlsData,
1776 PWCHAR UnicodeString,
1782 RtlUnicodeToMultiByteN (
1786 PWCHAR UnicodeString,
1792 RtlUnicodeToMultiByteSize (
1794 PWCHAR UnicodeString,
1804 PWCHAR UnicodeString,
1817 PEXCEPTION_REGISTRATION RegistrationFrame,
1818 PVOID ReturnAddress,
1819 PEXCEPTION_RECORD ExceptionRecord,
1825 RtlUpcaseUnicodeChar (
1831 RtlUpcaseUnicodeString (
1832 IN OUT PUNICODE_STRING DestinationString,
1833 IN PUNICODE_STRING SourceString,
1834 IN BOOLEAN AllocateDestinationString
1839 RtlUpcaseUnicodeStringToAnsiString (
1840 IN OUT PANSI_STRING DestinationString,
1841 IN PUNICODE_STRING SourceString,
1842 IN BOOLEAN AllocateDestinationString
1847 RtlUpcaseUnicodeStringToCountedOemString (
1848 IN OUT POEM_STRING DestinationString,
1849 IN PUNICODE_STRING SourceString,
1850 IN BOOLEAN AllocateDestinationString
1855 RtlUpcaseUnicodeStringToOemString (
1856 IN OUT POEM_STRING DestinationString,
1857 IN PUNICODE_STRING SourceString,
1858 IN BOOLEAN AllocateDestinationString
1863 RtlUpcaseUnicodeToCustomCPN (
1864 PRTL_NLS_DATA NlsData,
1868 PWCHAR UnicodeString,
1874 RtlUpcaseUnicodeToMultiByteN (
1878 PWCHAR UnicodeString,
1884 RtlUpcaseUnicodeToOemN (
1888 PWCHAR UnicodeString,
1901 PSTRING DestinationString,
1902 PSTRING SourceString
1915 RtlValidSecurityDescriptor (
1916 PSECURITY_DESCRIPTOR SecurityDescriptor
1920 RtlValidSid(IN PSID Sid);
1924 RtlWriteRegistryValue (
1934 RtlZeroMemory (PVOID Destination, ULONG Length);
1938 RtlxAnsiStringToUnicodeSize (
1939 IN PANSI_STRING AnsiString
1944 RtlxOemStringToUnicodeSize (
1945 IN POEM_STRING OemString
1950 RtlxUnicodeStringToAnsiSize (
1951 IN PUNICODE_STRING UnicodeString
1956 RtlxUnicodeStringToOemSize (
1957 IN PUNICODE_STRING UnicodeString
1961 /* Register io functions */
1965 READ_REGISTER_UCHAR (
1971 READ_REGISTER_USHORT (
1977 READ_REGISTER_ULONG (
1983 READ_REGISTER_BUFFER_UCHAR (
1991 READ_REGISTER_BUFFER_USHORT (
1999 READ_REGISTER_BUFFER_ULONG (
2007 WRITE_REGISTER_UCHAR (
2014 WRITE_REGISTER_USHORT (
2021 WRITE_REGISTER_ULONG (
2028 WRITE_REGISTER_BUFFER_UCHAR (
2036 WRITE_REGISTER_BUFFER_USHORT (
2044 WRITE_REGISTER_BUFFER_ULONG (
2051 NTSTATUS STDCALL RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision);
2052 NTSTATUS STDCALL RtlQueryInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
2053 NTSTATUS STDCALL RtlSetInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
2054 BOOLEAN STDCALL RtlValidAcl (PACL Acl);
2056 NTSTATUS STDCALL RtlAddAccessAllowedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
2057 NTSTATUS STDCALL RtlAddAccessDeniedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
2058 NTSTATUS STDCALL RtlAddAce(PACL Acl, ULONG Revision, ULONG StartingIndex, PACE AceList, ULONG AceListLength);
2059 NTSTATUS STDCALL RtlAddAuditAccessAce (PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid, BOOLEAN Success, BOOLEAN Failure);
2060 NTSTATUS STDCALL RtlDeleteAce(PACL Acl, ULONG AceIndex);
2061 BOOLEAN STDCALL RtlFirstFreeAce(PACL Acl, PACE* Ace);
2062 NTSTATUS STDCALL RtlGetAce(PACL Acl, ULONG AceIndex, PACE *Ace);
2064 NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
2065 NTSTATUS STDCALL RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
2066 NTSTATUS STDCALL RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG Revision);
2067 BOOLEAN STDCALL RtlValidSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
2068 ULONG STDCALL RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
2069 NTSTATUS STDCALL RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN DaclPresent, PACL Dacl, BOOLEAN DaclDefaulted);
2070 NTSTATUS STDCALL RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN DaclPresent, PACL* Dacl, PBOOLEAN DaclDefauted);
2071 NTSTATUS STDCALL RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Owner, BOOLEAN OwnerDefaulted);
2072 NTSTATUS STDCALL RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Owner, PBOOLEAN OwnerDefaulted);
2073 NTSTATUS STDCALL RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Group, BOOLEAN GroupDefaulted);
2074 NTSTATUS STDCALL RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Group, PBOOLEAN GroupDefaulted);
2075 NTSTATUS STDCALL RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSECURITY_DESCRIPTOR_CONTROL Control, PULONG Revision);
2076 NTSTATUS STDCALL RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN SaclPresent, PACL Sacl, BOOLEAN SaclDefaulted);
2077 NTSTATUS STDCALL RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN SaclPresent, PACL* Sacl, PBOOLEAN SaclDefauted);
2078 NTSTATUS STDCALL RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD,
2079 PSECURITY_DESCRIPTOR AbsSD,
2090 NTSTATUS STDCALL RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
2091 UCHAR SubAuthorityCount,
2092 ULONG SubAuthority0,
2093 ULONG SubAuthority1,
2094 ULONG SubAuthority2,
2095 ULONG SubAuthority3,
2096 ULONG SubAuthority4,
2097 ULONG SubAuthority5,
2098 ULONG SubAuthority6,
2099 ULONG SubAuthority7,
2101 ULONG STDCALL RtlLengthRequiredSid (UCHAR SubAuthorityCount);
2102 PSID_IDENTIFIER_AUTHORITY STDCALL RtlIdentifierAuthoritySid (PSID Sid);
2103 NTSTATUS STDCALL RtlInitializeSid (PSID Sid, PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, UCHAR SubAuthorityCount);
2104 PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
2105 BOOLEAN STDCALL RtlEqualPrefixSid (PSID Sid1, PSID Sid2);
2106 BOOLEAN STDCALL RtlEqualSid(PSID Sid1, PSID Sid2);
2107 PSID STDCALL RtlFreeSid (PSID Sid);
2108 ULONG STDCALL RtlLengthSid (PSID Sid);
2109 PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
2110 PUCHAR STDCALL RtlSubAuthorityCountSid (PSID Sid);
2111 BOOLEAN STDCALL RtlValidSid (PSID Sid);
2112 NTSTATUS STDCALL RtlConvertSidToUnicodeString (PUNICODE_STRING String, PSID Sid, BOOLEAN AllocateBuffer);
2114 BOOLEAN STDCALL RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
2115 BOOLEAN STDCALL RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
2116 VOID STDCALL RtlMapGenericMask (PACCESS_MASK AccessMask, PGENERIC_MAPPING GenericMapping);
2119 /* functions exported from NTOSKRNL.EXE which are considered RTL */
2121 #if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
2123 char *_itoa (int value, char *string, int radix);
2124 int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
2125 int _snwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, ...);
2126 int _stricmp(const char *s1, const char *s2);
2127 char * _strlwr(char *x);
2128 int _strnicmp(const char *s1, const char *s2, size_t n);
2129 char * _strnset(char* szToFill, int szFill, size_t sizeMaxFill);
2130 char * _strrev(char *s);
2131 char * _strset(char* szToFill, int szFill);
2132 char * _strupr(char *x);
2133 int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args);
2134 int _wcsicmp (const wchar_t* cs, const wchar_t* ct);
2135 wchar_t * _wcslwr (wchar_t *x);
2136 int _wcsnicmp (const wchar_t * cs,const wchar_t * ct,size_t count);
2137 wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
2138 wchar_t * _wcsrev(wchar_t *s);
2139 wchar_t *_wcsupr(wchar_t *x);
2141 int atoi(const char *str);
2142 long atol(const char *str);
2148 int isxdigit(int c);
2149 size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count);
2150 int mbtowc (wchar_t *wchar, const char *mbchar, size_t count);
2151 void * memchr(const void *s, int c, size_t n);
2152 void * memcpy(void *to, const void *from, size_t count);
2153 void * memmove(void *dest,const void *src, size_t count);
2154 void * memset(void *src, int val, size_t count);
2161 int sprintf(char * buf, const char *fmt, ...);
2162 void srand(unsigned seed);
2163 char * strcat(char *s, const char *append);
2164 char * strchr(const char *s, int c);
2165 int strcmp(const char *s1, const char *s2);
2166 char * strcpy(char *to, const char *from);
2167 size_t strlen(const char *str);
2168 char * strncat(char *dst, const char *src, size_t n);
2169 int strncmp(const char *s1, const char *s2, size_t n);
2170 char *strncpy(char *dst, const char *src, size_t n);
2171 char *strrchr(const char *s, int c);
2172 size_t strspn(const char *s1, const char *s2);
2173 char *strstr(const char *s, const char *find);
2174 int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
2177 wchar_t towlower(wchar_t c);
2178 wchar_t towupper(wchar_t c);
2179 int vsprintf(char *buf, const char *fmt, va_list args);
2180 wchar_t * wcscat(wchar_t *dest, const wchar_t *src);
2181 wchar_t * wcschr(const wchar_t *str, wchar_t ch);
2182 int wcscmp(const wchar_t *cs, const wchar_t *ct);
2183 wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2);
2184 size_t wcscspn(const wchar_t *str,const wchar_t *reject);
2185 size_t wcslen(const wchar_t *s);
2186 wchar_t * wcsncat(wchar_t *dest, const wchar_t *src, size_t count);
2187 int wcsncmp(const wchar_t *cs, const wchar_t *ct, size_t count);
2188 wchar_t * wcsncpy(wchar_t *dest, const wchar_t *src, size_t count);
2189 wchar_t * wcsrchr(const wchar_t *str, wchar_t ch);
2190 size_t wcsspn(const wchar_t *str,const wchar_t *accept);
2191 wchar_t *wcsstr(const wchar_t *s,const wchar_t *b);
2192 size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count);
2193 int wctomb (char *mbchar, wchar_t wchar);
2195 #endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
2197 #endif /* __DDK_RTL_H */