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; \
199 static inline PSINGLE_LIST_ENTRY
200 PopEntryList(PSINGLE_LIST_ENTRY ListHead)
202 PSINGLE_LIST_ENTRY ListEntry;
204 ListEntry = ListHead->Next;
207 ListHead->Next = ListEntry->Next;
213 #define RtlCopyMemory(Destination,Source,Length) \
214 memcpy((Destination),(Source),(Length))
220 PSINGLE_LIST_ENTRY ListHead,
221 PSINGLE_LIST_ENTRY Entry
224 Entry->Next = ListHead->Next;
225 ListHead->Next = Entry;
235 * Removes an entry from a double linked list
238 * ListEntry = Entry to remove
240 #define RemoveEntryList(ListEntry) \
242 PLIST_ENTRY OldFlink; \
243 PLIST_ENTRY OldBlink; \
244 assert((ListEntry) != NULL); \
245 assert((ListEntry)->Blink!=NULL); \
246 assert((ListEntry)->Blink->Flink == (ListEntry)); \
247 assert((ListEntry)->Flink != NULL); \
248 assert((ListEntry)->Flink->Blink == (ListEntry)); \
249 OldFlink = (ListEntry)->Flink; \
250 OldBlink = (ListEntry)->Blink; \
251 OldFlink->Blink = OldBlink; \
252 OldBlink->Flink = OldFlink; \
253 (ListEntry)->Flink = NULL; \
254 (ListEntry)->Blink = NULL; \
261 * PLIST_ENTRY ListHead
265 * Removes the head entry from a double linked list
268 * ListHead = Head of the list
274 #define RemoveHeadList(ListHead) \
276 {RemoveEntryList((ListHead)->Flink)}
293 PLIST_ENTRY OldFlink;
294 PLIST_ENTRY OldBlink;
296 Old = ListHead->Flink;
298 OldFlink = ListHead->Flink->Flink;
299 OldBlink = ListHead->Flink->Blink;
300 OldFlink->Blink = OldBlink;
301 OldBlink->Flink = OldFlink;
315 * PLIST_ENTRY ListHead
319 * Removes the tail entry from a double linked list
322 * ListHead = Head of the list
328 #define RemoveTailList(ListHead) \
330 {RemoveEntryList((ListHead)->Blink)}
347 PLIST_ENTRY OldFlink;
348 PLIST_ENTRY OldBlink;
350 Old = ListHead->Blink;
352 OldFlink = ListHead->Blink->Flink;
353 OldBlink = ListHead->Blink->Blink;
354 OldFlink->Blink = OldBlink;
355 OldBlink->Flink = OldFlink;
367 RtlAppendUnicodeToString (
368 PUNICODE_STRING Destination,
382 RtlEqualUnicodeString (
383 PUNICODE_STRING String1,
384 PUNICODE_STRING String2,
385 BOOLEAN CaseInSensitive
390 RtlGetCallersAddress (
391 PVOID * CallersAddress
396 RtlQueryRegistryValues (
399 IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
406 RtlWriteRegistryValue (
416 RtlDeleteRegistryValue(IN ULONG RelativeTo,
418 IN PCWSTR ValueName);
421 RtlMoveMemory (PVOID Destination, CONST VOID* Source, ULONG Length);
424 RtlEqualLuid(IN PLUID Luid1,
436 RtlZeroMemory (PVOID Destination, ULONG Length);
438 #else /* __USE_W32API */
440 #include <ddk/ntifs.h>
442 #endif /* __USE_W32API */
446 * PURPOSE: Used with RtlCheckRegistryKey, RtlCreateRegistryKey,
447 * RtlDeleteRegistryKey
449 #define RTL_REGISTRY_ABSOLUTE 0
450 #define RTL_REGISTRY_SERVICES 1
451 #define RTL_REGISTRY_CONTROL 2
452 #define RTL_REGISTRY_WINDOWS_NT 3
453 #define RTL_REGISTRY_DEVICEMAP 4
454 #define RTL_REGISTRY_USER 5
455 #define RTL_REGISTRY_ENUM 6 /* ReactOS specific: Used internally in kernel only */
456 #define RTL_REGISTRY_MAXIMUM 7
458 #define RTL_REGISTRY_HANDLE 0x40000000
459 #define RTL_REGISTRY_OPTIONAL 0x80000000
462 #define SHORT_SIZE (sizeof(USHORT))
463 #define SHORT_MASK (SHORT_SIZE-1)
464 #define LONG_SIZE (sizeof(ULONG))
465 #define LONG_MASK (LONG_SIZE-1)
466 #define LOWBYTE_MASK 0x00FF
468 #define FIRSTBYTE(Value) ((Value) & LOWBYTE_MASK)
469 #define SECONDBYTE(Value) (((Value) >> 8) & LOWBYTE_MASK)
470 #define THIRDBYTE(Value) (((Value) >> 16) & LOWBYTE_MASK)
471 #define FOURTHBYTE(Value) (((Value) >> 24) & LOWBYTE_MASK)
473 /* FIXME: reverse byte-order on big-endian machines (e.g. MIPS) */
474 #define SHORT_LEAST_SIGNIFICANT_BIT 0
475 #define SHORT_MOST_SIGNIFICANT_BIT 1
477 #define LONG_LEAST_SIGNIFICANT_BIT 0
478 #define LONG_3RD_MOST_SIGNIFICANT_BIT 1
479 #define LONG_2RD_MOST_SIGNIFICANT_BIT 2
480 #define LONG_MOST_SIGNIFICANT_BIT 3
483 #define NLS_ANSI_CODE_PAGE NlsAnsiCodePage
484 #define NLS_LEAD_BYTE_INFO NlsLeadByteInfo
485 #define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
486 #define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
487 #define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
489 #if defined(__NTOSKRNL__) || defined(__NTDLL__)
490 extern USHORT EXPORTED NlsAnsiCodePage;
491 extern PUSHORT EXPORTED NlsLeadByteInfo;
492 extern BOOLEAN EXPORTED NlsMbCodePageTag;
493 extern BOOLEAN EXPORTED NlsMbOemCodePageTag;
494 extern PUSHORT EXPORTED NlsOemLeadByteInfo;
496 extern USHORT IMPORTED NlsAnsiCodePage;
497 extern PUSHORT IMPORTED NlsLeadByteInfo;
498 extern BOOLEAN IMPORTED NlsMbCodePageTag;
499 extern BOOLEAN IMPORTED NlsMbOemCodePageTag;
500 extern PUSHORT IMPORTED NlsOemLeadByteInfo;
501 #endif /* __NTOSKRNL__ || __NTDLL__ */
505 * NOTE: ReactOS extensions
507 #define RtlMin(X,Y) (((X) < (Y))? (X) : (Y))
508 #define RtlMax(X,Y) (((X) > (Y))? (X) : (Y))
509 #define RtlMin3(X,Y,Z) (((X) < (Y)) ? RtlMin(X,Z) : RtlMin(Y,Z))
510 #define RtlMax3(X,Y,Z) (((X) > (Y)) ? RtlMax(X,Z) : RtlMax(Y,Z))
515 * InitializeUnicodeString(PUNICODE_STRING DestinationString,
517 * USHORT MaximumLength,
520 * Initialize n UNICODE_STRING from its fields. Use when you know the values of
521 * all the fields in advance
524 #define InitializeUnicodeString(__PDEST_STRING__,__LENGTH__,__MAXLENGTH__,__BUFFER__) \
526 (__PDEST_STRING__)->Length = (__LENGTH__); \
527 (__PDEST_STRING__)->MaximumLength = (__MAXLENGTH__); \
528 (__PDEST_STRING__)->Buffer = (__BUFFER__); \
534 * RtlInitUnicodeStringFromLiteral(PUNICODE_STRING DestinationString,
535 * PCWSTR SourceString);
537 * Initialize a UNICODE_STRING from a wide string literal. WARNING: use only with
538 * string literals and statically initialized arrays, it will calculate the wrong
542 #define RtlInitUnicodeStringFromLiteral(__PDEST_STRING__,__SOURCE_STRING__) \
543 InitializeUnicodeString( \
544 (__PDEST_STRING__), \
545 sizeof(__SOURCE_STRING__) - sizeof(WCHAR), \
546 sizeof(__SOURCE_STRING__), \
547 (__SOURCE_STRING__) \
552 * Static initializer for UNICODE_STRING variables.
555 * UNICODE_STRING wstr = UNICODE_STRING_INITIALIZER(L"string");
558 #define UNICODE_STRING_INITIALIZER(__SOURCE_STRING__) \
560 sizeof((__SOURCE_STRING__)) - sizeof(WCHAR), \
561 sizeof((__SOURCE_STRING__)), \
562 (__SOURCE_STRING__) \
567 * Initializer for empty UNICODE_STRING variables.
570 * UNICODE_STRING wstr = EMPTY_UNICODE_STRING;
573 #define EMPTY_UNICODE_STRING {0, 0, NULL}
579 PSINGLE_LIST_ENTRY ListHead,
580 PSINGLE_LIST_ENTRY Entry
584 #define PushEntryList(ListHead,Entry) \
585 (Entry)->Next = (ListHead)->Next; \
586 (ListHead)->Next = (Entry)
592 RtlAddAtomToAtomTable (
593 IN PRTL_ATOM_TABLE AtomTable,
607 RtlAnsiCharToUnicodeChar (
613 RtlAnsiStringToUnicodeSize (
614 PANSI_STRING AnsiString
619 RtlAnsiStringToUnicodeString (
620 PUNICODE_STRING DestinationString,
621 PANSI_STRING SourceString,
622 BOOLEAN AllocateDestinationString
627 RtlAppendAsciizToString(
634 RtlAppendStringToString (
641 RtlAppendUnicodeStringToString (
642 PUNICODE_STRING Destination,
643 PUNICODE_STRING Source
649 PRTL_BITMAP BitMapHeader,
657 PRTL_BITMAP BitMapHeader,
665 PVOID FailedAssertion,
681 RtlCheckRegistryKey (
689 IN PRTL_BITMAP BitMapHeader
695 IN PRTL_BITMAP BitMapHeader,
696 IN ULONG StartingIndex,
697 IN ULONG NumberToClear
712 BOOLEAN CaseInsensitive
717 RtlCompareUnicodeString (
718 PUNICODE_STRING String1,
719 PUNICODE_STRING String2,
720 BOOLEAN CaseInsensitive
724 RtlCompressBuffer(IN USHORT CompressionFormatAndEngine,
725 IN PUCHAR UncompressedBuffer,
726 IN ULONG UncompressedBufferSize,
727 OUT PUCHAR CompressedBuffer,
728 IN ULONG CompressedBufferSize,
729 IN ULONG UncompressedChunkSize,
730 OUT PULONG FinalCompressedSize,
734 RtlCompressChunks(IN PUCHAR UncompressedBuffer,
735 IN ULONG UncompressedBufferSize,
736 OUT PUCHAR CompressedBuffer,
737 IN ULONG CompressedBufferSize,
738 IN OUT PCOMPRESSED_DATA_INFO CompressedDataInfo,
739 IN ULONG CompressedDataInfoLength,
742 LARGE_INTEGER STDCALL
743 RtlConvertLongToLargeInteger(IN LONG SignedInteger);
746 RtlConvertSidToUnicodeString(IN OUT PUNICODE_STRING String,
748 IN BOOLEAN AllocateString);
750 LARGE_INTEGER STDCALL
751 RtlConvertUlongToLargeInteger(IN ULONG UnsignedInteger);
769 #define RtlCopyBytes RtlCopyMemory
772 RtlCopyLuid(IN PLUID LuidDest,
776 RtlCopyLuidAndAttributesArray(ULONG Count,
777 PLUID_AND_ATTRIBUTES Src,
778 PLUID_AND_ATTRIBUTES Dest);
781 RtlCopySid(ULONG BufferLength,
786 RtlCopySidAndAttributesArray(ULONG Count,
787 PSID_AND_ATTRIBUTES Src,
789 PSID_AND_ATTRIBUTES Dest,
791 PVOID* RemainingSidArea,
792 PULONG RemainingSidAreaSize);
795 RtlCopyString(PSTRING DestinationString,
796 PSTRING SourceString);
799 RtlCopyUnicodeString(PUNICODE_STRING DestinationString,
800 PUNICODE_STRING SourceString);
803 RtlCreateAtomTable(IN ULONG TableSize,
804 IN OUT PRTL_ATOM_TABLE *AtomTable);
811 ULONG SizeToReserve, /* dwMaximumSize */
812 ULONG SizeToCommit, /* dwInitialSize */
814 PRTL_HEAP_DEFINITION Definition
819 RtlCreateRegistryKey (
826 RtlCreateSecurityDescriptor (
827 PSECURITY_DESCRIPTOR SecurityDescriptor,
833 RtlCreateUnicodeString (
834 OUT PUNICODE_STRING Destination,
839 RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
844 RtlCustomCPToUnicodeN (
845 IN PCPTABLEINFO CustomCP,
846 PWCHAR UnicodeString,
854 RtlDecompressBuffer(IN USHORT CompressionFormat,
855 OUT PUCHAR UncompressedBuffer,
856 IN ULONG UncompressedBufferSize,
857 IN PUCHAR CompressedBuffer,
858 IN ULONG CompressedBufferSize,
859 OUT PULONG FinalUncompressedSize);
862 RtlDecompressChunks(OUT PUCHAR UncompressedBuffer,
863 IN ULONG UncompressedBufferSize,
864 IN PUCHAR CompressedBuffer,
865 IN ULONG CompressedBufferSize,
866 IN PUCHAR CompressedTail,
867 IN ULONG CompressedTailSize,
868 IN PCOMPRESSED_DATA_INFO CompressedDataInfo);
871 RtlDecompressFragment(IN USHORT CompressionFormat,
872 OUT PUCHAR UncompressedFragment,
873 IN ULONG UncompressedFragmentSize,
874 IN PUCHAR CompressedBuffer,
875 IN ULONG CompressedBufferSize,
876 IN ULONG FragmentOffset,
877 OUT PULONG FinalUncompressedSize,
881 RtlDeleteAtomFromAtomTable(IN PRTL_ATOM_TABLE AtomTable,
885 RtlDescribeChunk(IN USHORT CompressionFormat,
886 IN OUT PUCHAR *CompressedBuffer,
887 IN PUCHAR EndOfCompressedBufferPlus1,
888 OUT PUCHAR *ChunkBuffer,
889 OUT PULONG ChunkSize);
892 RtlDestroyAtomTable(IN PRTL_ATOM_TABLE AtomTable);
895 RtlDestroyHeap(HANDLE hheap);
899 RtlDowncaseUnicodeString (
900 IN OUT PUNICODE_STRING DestinationString,
901 IN PUNICODE_STRING SourceString,
902 IN BOOLEAN AllocateDestinationString
908 IN PRTL_ATOM_TABLE AtomTable,
909 IN BOOLEAN DeletePinned
914 RtlEnlargedIntegerMultiply (
921 RtlEnlargedUnsignedDivide (
922 ULARGE_INTEGER Dividend,
929 RtlEnlargedUnsignedMultiply (
939 BOOLEAN CaseInSensitive
944 RtlExtendedIntegerMultiply (
945 LARGE_INTEGER Multiplicand,
951 RtlExtendedLargeIntegerDivide (
952 LARGE_INTEGER Dividend,
959 RtlExtendedMagicDivide (
960 LARGE_INTEGER Dividend,
961 LARGE_INTEGER MagicDivisor,
976 PRTL_BITMAP BitMapHeader,
983 RtlFindClearBitsAndSet (
984 PRTL_BITMAP BitMapHeader,
991 RtlFindFirstRunClear (
992 PRTL_BITMAP BitMapHeader,
999 PRTL_BITMAP BitMapHeader,
1000 PULONG StartingIndex
1005 RtlFindLongestRunClear (
1006 PRTL_BITMAP BitMapHeader,
1007 PULONG StartingIndex
1012 RtlFindLongestRunSet (
1013 PRTL_BITMAP BitMapHeader,
1014 PULONG StartingIndex
1020 IN PVOID BaseAddress,
1024 OUT PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry
1030 PRTL_BITMAP BitMapHeader,
1037 RtlFindSetBitsAndClear (
1038 PRTL_BITMAP BitMapHeader,
1045 RtlFormatCurrentUserKeyPath (
1046 IN OUT PUNICODE_STRING KeyPath
1052 PANSI_STRING AnsiString
1066 POEM_STRING OemString
1071 RtlFreeUnicodeString (
1072 PUNICODE_STRING UnicodeString
1076 RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
1077 IN BOOLEAN AllowExtendedCharacters,
1078 IN OUT PGENERATE_NAME_CONTEXT Context,
1079 OUT PUNICODE_STRING Name8dot3);
1082 RtlGetCompressionWorkSpaceSize(IN USHORT CompressionFormatAndEngine,
1083 OUT PULONG CompressBufferAndWorkSpaceSize,
1084 OUT PULONG CompressFragmentWorkSpaceSize);
1088 RtlGetDefaultCodePage (
1089 PUSHORT AnsiCodePage,
1095 RtlImageDirectoryEntryToData (
1105 IN PVOID BaseAddress
1108 PIMAGE_SECTION_HEADER
1110 RtlImageRvaToSection (
1111 PIMAGE_NT_HEADERS NtHeader,
1119 PIMAGE_NT_HEADERS NtHeader,
1122 PIMAGE_SECTION_HEADER *SectionHeader
1128 PANSI_STRING DestinationString,
1134 RtlInitCodePageTable (
1135 IN PUSHORT TableBase,
1136 OUT PCPTABLEINFO CodePageTable
1142 IN PUSHORT AnsiTableBase,
1143 IN PUSHORT OemTableBase,
1144 IN PUSHORT CaseTableBase,
1145 OUT PNLSTABLEINFO NlsTable
1151 PSTRING DestinationString,
1157 RtlInitUnicodeString (
1158 PUNICODE_STRING DestinationString,
1164 RtlInitializeBitMap (
1165 IN OUT PRTL_BITMAP BitMapHeader,
1166 IN PULONG BitMapBuffer,
1167 IN ULONG SizeOfBitMap
1172 RtlInitializeContext (
1173 IN HANDLE ProcessHandle,
1174 IN PCONTEXT Context,
1176 IN PTHREAD_START_ROUTINE StartAddress,
1177 IN OUT PUSER_STACK UserStack
1182 RtlInitializeGenericTable (
1183 IN OUT PRTL_GENERIC_TABLE Table,
1184 IN PVOID CompareRoutine,
1185 IN PVOID AllocateRoutine,
1186 IN PVOID FreeRoutine,
1187 IN ULONG UserParameter
1192 RtlInsertElementGenericTable (
1193 IN OUT PRTL_GENERIC_TABLE Table,
1195 IN ULONG ElementSize,
1210 RtlIntegerToUnicodeString (
1213 IN OUT PUNICODE_STRING String
1218 RtlIsGenericTableEmpty (
1219 IN PRTL_GENERIC_TABLE Table
1224 RtlIsNameLegalDOS8Dot3 (
1225 IN PUNICODE_STRING UnicodeName,
1226 IN PANSI_STRING AnsiName,
1227 OUT PBOOLEAN SpacesFound
1240 RtlLargeIntegerAdd (
1241 LARGE_INTEGER Addend1,
1242 LARGE_INTEGER Addend2
1247 * RtlLargeIntegerAnd (
1248 * PLARGE_INTEGER Result,
1249 * LARGE_INTEGER Source,
1250 * LARGE_INTEGER Mask
1253 #define RtlLargeIntegerAnd(Result, Source, Mask) \
1255 Result.HighPart = Source.HighPart & Mask.HighPart; \
1256 Result.LowPart = Source.LowPart & Mask.LowPart; \
1261 RtlLargeIntegerArithmeticShift (
1262 LARGE_INTEGER LargeInteger,
1268 RtlLargeIntegerDivide (
1269 LARGE_INTEGER Dividend,
1270 LARGE_INTEGER Divisor,
1271 PLARGE_INTEGER Remainder
1276 * RtlLargeIntegerEqualTo (
1277 * LARGE_INTEGER Operand1,
1278 * LARGE_INTEGER Operand2
1281 #define RtlLargeIntegerEqualTo(X,Y) \
1282 (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1286 * RtlLargeIntegerEqualToZero (
1287 * LARGE_INTEGER Operand
1290 #define RtlLargeIntegerEqualToZero(X) \
1291 (!((X).LowPart | (X).HighPart))
1295 * RtlLargeIntegerGreaterThan (
1296 * LARGE_INTEGER Operand1,
1297 * LARGE_INTEGER Operand2
1300 #define RtlLargeIntegerGreaterThan(X,Y) \
1301 ((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
1302 ((X).HighPart > (Y).HighPart))
1306 * RtlLargeIntegerGreaterThanOrEqualTo (
1307 * LARGE_INTEGER Operand1,
1308 * LARGE_INTEGER Operand2
1311 #define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
1312 ((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
1313 ((X).HighPart > (Y).HighPart))
1317 * RtlLargeIntegerGreaterThanOrEqualToZero (
1318 * LARGE_INTEGER Operand1
1321 #define RtlLargeIntegerGreaterOrEqualToZero(X) \
1326 * RtlLargeIntegerGreaterThanZero (
1327 * LARGE_INTEGER Operand1
1330 #define RtlLargeIntegerGreaterThanZero(X) \
1331 ((((X).HighPart == 0) && ((X).LowPart > 0)) || \
1332 ((X).HighPart > 0 ))
1336 * RtlLargeIntegerLessThan (
1337 * LARGE_INTEGER Operand1,
1338 * LARGE_INTEGER Operand2
1341 #define RtlLargeIntegerLessThan(X,Y) \
1342 ((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
1343 ((X).HighPart < (Y).HighPart))
1347 * RtlLargeIntegerLessThanOrEqualTo (
1348 * LARGE_INTEGER Operand1,
1349 * LARGE_INTEGER Operand2
1352 #define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
1353 ((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
1354 ((X).HighPart < (Y).HighPart))
1358 * RtlLargeIntegerLessThanOrEqualToZero (
1359 * LARGE_INTEGER Operand
1362 #define RtlLargeIntegerLessOrEqualToZero(X) \
1363 (((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
1367 * RtlLargeIntegerLessThanZero (
1368 * LARGE_INTEGER Operand
1371 #define RtlLargeIntegerLessThanZero(X) \
1372 (((X).HighPart < 0))
1376 RtlLargeIntegerNegate (
1377 LARGE_INTEGER Subtrahend
1382 * RtlLargeIntegerNotEqualTo (
1383 * LARGE_INTEGER Operand1,
1384 * LARGE_INTEGER Operand2
1387 #define RtlLargeIntegerNotEqualTo(X,Y) \
1388 ((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1392 * RtlLargeIntegerNotEqualToZero (
1393 * LARGE_INTEGER Operand
1396 #define RtlLargeIntegerNotEqualToZero(X) \
1397 (((X).LowPart | (X).HighPart))
1401 RtlLargeIntegerShiftLeft (
1402 LARGE_INTEGER LargeInteger,
1408 RtlLargeIntegerShiftRight (
1409 LARGE_INTEGER LargeInteger,
1415 RtlLargeIntegerSubtract (
1416 LARGE_INTEGER Minuend,
1417 LARGE_INTEGER Subtrahend
1422 RtlLengthSecurityDescriptor (
1423 PSECURITY_DESCRIPTOR SecurityDescriptor
1434 RtlLookupAtomInAtomTable (
1435 IN PRTL_ATOM_TABLE AtomTable,
1442 RtlMultiByteToUnicodeN (
1443 PWCHAR UnicodeString,
1446 const PCHAR MbString,
1452 RtlMultiByteToUnicodeSize (
1460 RtlNtStatusToDosError (
1466 RtlNtStatusToDosErrorNoTeb (
1472 RtlNtStatusToPsxErrno (
1478 RtlNumberGenericTableElements (
1479 IN PRTL_GENERIC_TABLE Table
1484 RtlNumberOfClearBits (
1485 PRTL_BITMAP BitMapHeader
1490 RtlNumberOfSetBits (
1491 PRTL_BITMAP BitMapHeader
1496 RtlOemStringToUnicodeSize (
1497 POEM_STRING AnsiString
1502 RtlOemStringToUnicodeString (
1503 PUNICODE_STRING DestinationString,
1504 POEM_STRING SourceString,
1505 BOOLEAN AllocateDestinationString
1511 PWCHAR UnicodeString,
1519 RtlPinAtomInAtomTable (
1520 IN PRTL_ATOM_TABLE AtomTable,
1527 PANSI_STRING String1,
1528 PANSI_STRING String2,
1529 BOOLEAN CaseInsensitive
1534 RtlPrefixUnicodeString (
1535 PUNICODE_STRING String1,
1536 PUNICODE_STRING String2,
1537 BOOLEAN CaseInsensitive
1542 RtlQueryAtomInAtomTable (
1543 IN PRTL_ATOM_TABLE AtomTable,
1545 IN OUT PULONG RefCount OPTIONAL,
1546 IN OUT PULONG PinCount OPTIONAL,
1547 IN OUT PWSTR AtomName OPTIONAL,
1548 IN OUT PULONG NameLength OPTIONAL
1553 RtlQueryTimeZoneInformation (
1554 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1560 IN PEXCEPTION_RECORD ExceptionRecord
1575 IN USHORT CompressionFormat,
1576 IN OUT PUCHAR *CompressedBuffer,
1577 IN PUCHAR EndOfCompressedBufferPlus1,
1578 OUT PUCHAR *ChunkBuffer,
1584 RtlResetRtlTranslations (
1585 IN PNLSTABLEINFO NlsTable
1590 * RtlRetrieveUlong (
1591 * PULONG DestinationAddress,
1592 * PULONG SourceAddress
1595 #define RtlRetrieveUlong(DestAddress,SrcAddress) \
1596 if ((ULONG)(SrcAddress) & LONG_MASK) \
1598 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1599 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1600 ((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
1601 ((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
1605 *((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
1610 * RtlRetrieveUshort (
1611 * PUSHORT DestinationAddress,
1612 * PUSHORT SourceAddress
1615 #define RtlRetrieveUshort(DestAddress,SrcAddress) \
1616 if ((ULONG)(SrcAddress) & SHORT_MASK) \
1618 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1619 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1623 *((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
1628 RtlSecondsSince1970ToTime (
1629 ULONG SecondsSince1970,
1635 RtlSecondsSince1980ToTime (
1636 ULONG SecondsSince1980,
1643 IN PRTL_BITMAP BitMapHeader
1649 PRTL_BITMAP BitMapHeader,
1650 ULONG StartingIndex,
1656 RtlSetDaclSecurityDescriptor (
1657 PSECURITY_DESCRIPTOR SecurityDescriptor,
1658 BOOLEAN DaclPresent,
1660 BOOLEAN DaclDefaulted
1665 RtlSetTimeZoneInformation (
1666 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1684 #define RtlStoreUlong(Address,Value) \
1685 if ((ULONG)(Address) & LONG_MASK) \
1687 ((PUCHAR)(Address))[LONG_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1688 ((PUCHAR)(Address))[LONG_3RD_MOST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1689 ((PUCHAR)(Address))[LONG_2ND_MOST_SIGNIFICANT_BIT]=(UCHAR)(THIRDBYTE(Value)); \
1690 ((PUCHAR)(Address))[LONG_MOST_SIGNIFICANT_BIT]=(UCHAR)(FOURTHBYTE(Value)); \
1694 *((PULONG)(Address))=(ULONG)(Value); \
1704 #define RtlStoreUshort(Address,Value) \
1705 if ((ULONG)(Address) & SHORT_MASK) \
1707 ((PUCHAR)(Address))[SHORT_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1708 ((PUCHAR)(Address))[SHORT_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
1712 *((PUSHORT)(Address))=(USHORT)(Value); \
1717 RtlTimeFieldsToTime (
1718 PTIME_FIELDS TimeFields,
1724 RtlTimeToSecondsSince1970 (
1725 PLARGE_INTEGER Time,
1726 PULONG SecondsSince1970
1731 RtlTimeToSecondsSince1980 (
1732 PLARGE_INTEGER Time,
1733 PULONG SecondsSince1980
1738 RtlTimeToTimeFields (
1739 PLARGE_INTEGER Time,
1740 PTIME_FIELDS TimeFields
1745 RtlUnicodeStringToAnsiSize (
1746 IN PUNICODE_STRING UnicodeString
1751 RtlUnicodeStringToAnsiString (
1752 IN OUT PANSI_STRING DestinationString,
1753 IN PUNICODE_STRING SourceString,
1754 IN BOOLEAN AllocateDestinationString
1759 RtlUnicodeStringToInteger (
1760 IN PUNICODE_STRING String,
1767 RtlUnicodeStringToOemSize (
1768 IN PUNICODE_STRING UnicodeString
1773 RtlUnicodeStringToCountedOemString (
1774 IN OUT POEM_STRING DestinationString,
1775 IN PUNICODE_STRING SourceString,
1776 IN BOOLEAN AllocateDestinationString
1781 RtlUnicodeStringToOemString (
1782 IN OUT POEM_STRING DestinationString,
1783 IN PUNICODE_STRING SourceString,
1784 IN BOOLEAN AllocateDestinationString
1789 RtlUnicodeToCustomCPN (
1790 IN PCPTABLEINFO CustomCP,
1794 PWCHAR UnicodeString,
1800 RtlUnicodeToMultiByteN (
1804 PWCHAR UnicodeString,
1810 RtlUnicodeToMultiByteSize (
1812 PWCHAR UnicodeString,
1822 PWCHAR UnicodeString,
1835 PEXCEPTION_REGISTRATION RegistrationFrame,
1836 PVOID ReturnAddress,
1837 PEXCEPTION_RECORD ExceptionRecord,
1843 RtlUpcaseUnicodeChar (
1849 RtlUpcaseUnicodeString (
1850 IN OUT PUNICODE_STRING DestinationString,
1851 IN PCUNICODE_STRING SourceString,
1852 IN BOOLEAN AllocateDestinationString
1857 RtlUpcaseUnicodeStringToAnsiString (
1858 IN OUT PANSI_STRING DestinationString,
1859 IN PUNICODE_STRING SourceString,
1860 IN BOOLEAN AllocateDestinationString
1865 RtlUpcaseUnicodeStringToCountedOemString (
1866 IN OUT POEM_STRING DestinationString,
1867 IN PUNICODE_STRING SourceString,
1868 IN BOOLEAN AllocateDestinationString
1873 RtlUpcaseUnicodeStringToOemString (
1874 IN OUT POEM_STRING DestinationString,
1875 IN PUNICODE_STRING SourceString,
1876 IN BOOLEAN AllocateDestinationString
1881 RtlUpcaseUnicodeToCustomCPN (
1882 IN PCPTABLEINFO CustomCP,
1886 PWCHAR UnicodeString,
1892 RtlUpcaseUnicodeToMultiByteN (
1896 PWCHAR UnicodeString,
1902 RtlUpcaseUnicodeToOemN (
1906 PWCHAR UnicodeString,
1919 PSTRING DestinationString,
1920 PSTRING SourceString
1933 RtlValidSecurityDescriptor (
1934 PSECURITY_DESCRIPTOR SecurityDescriptor
1938 RtlValidSid(IN PSID Sid);
1942 RtlxAnsiStringToUnicodeSize (
1943 IN PANSI_STRING AnsiString
1948 RtlxOemStringToUnicodeSize (
1949 IN POEM_STRING OemString
1954 RtlxUnicodeStringToAnsiSize (
1955 IN PUNICODE_STRING UnicodeString
1960 RtlxUnicodeStringToOemSize (
1961 IN PUNICODE_STRING UnicodeString
1965 /* Register io functions */
1969 READ_REGISTER_UCHAR (
1975 READ_REGISTER_USHORT (
1981 READ_REGISTER_ULONG (
1987 READ_REGISTER_BUFFER_UCHAR (
1995 READ_REGISTER_BUFFER_USHORT (
2003 READ_REGISTER_BUFFER_ULONG (
2011 WRITE_REGISTER_UCHAR (
2018 WRITE_REGISTER_USHORT (
2025 WRITE_REGISTER_ULONG (
2032 WRITE_REGISTER_BUFFER_UCHAR (
2040 WRITE_REGISTER_BUFFER_USHORT (
2048 WRITE_REGISTER_BUFFER_ULONG (
2055 NTSTATUS STDCALL RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision);
2056 NTSTATUS STDCALL RtlQueryInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
2057 NTSTATUS STDCALL RtlSetInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
2058 BOOLEAN STDCALL RtlValidAcl (PACL Acl);
2060 NTSTATUS STDCALL RtlAddAccessAllowedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
2061 NTSTATUS STDCALL RtlAddAccessDeniedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
2062 NTSTATUS STDCALL RtlAddAce(PACL Acl, ULONG Revision, ULONG StartingIndex, PACE AceList, ULONG AceListLength);
2063 NTSTATUS STDCALL RtlAddAuditAccessAce (PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid, BOOLEAN Success, BOOLEAN Failure);
2064 NTSTATUS STDCALL RtlDeleteAce(PACL Acl, ULONG AceIndex);
2065 BOOLEAN STDCALL RtlFirstFreeAce(PACL Acl, PACE* Ace);
2066 NTSTATUS STDCALL RtlGetAce(PACL Acl, ULONG AceIndex, PACE *Ace);
2068 NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
2069 NTSTATUS STDCALL RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
2070 NTSTATUS STDCALL RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG Revision);
2071 BOOLEAN STDCALL RtlValidSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
2072 ULONG STDCALL RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
2073 NTSTATUS STDCALL RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN DaclPresent, PACL Dacl, BOOLEAN DaclDefaulted);
2074 NTSTATUS STDCALL RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN DaclPresent, PACL* Dacl, PBOOLEAN DaclDefauted);
2075 NTSTATUS STDCALL RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Owner, BOOLEAN OwnerDefaulted);
2076 NTSTATUS STDCALL RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Owner, PBOOLEAN OwnerDefaulted);
2077 NTSTATUS STDCALL RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Group, BOOLEAN GroupDefaulted);
2078 NTSTATUS STDCALL RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Group, PBOOLEAN GroupDefaulted);
2079 NTSTATUS STDCALL RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSECURITY_DESCRIPTOR_CONTROL Control, PULONG Revision);
2080 NTSTATUS STDCALL RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN SaclPresent, PACL Sacl, BOOLEAN SaclDefaulted);
2081 NTSTATUS STDCALL RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN SaclPresent, PACL* Sacl, PBOOLEAN SaclDefauted);
2082 NTSTATUS STDCALL RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD,
2083 PSECURITY_DESCRIPTOR AbsSD,
2094 NTSTATUS STDCALL RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
2095 UCHAR SubAuthorityCount,
2096 ULONG SubAuthority0,
2097 ULONG SubAuthority1,
2098 ULONG SubAuthority2,
2099 ULONG SubAuthority3,
2100 ULONG SubAuthority4,
2101 ULONG SubAuthority5,
2102 ULONG SubAuthority6,
2103 ULONG SubAuthority7,
2105 ULONG STDCALL RtlLengthRequiredSid (UCHAR SubAuthorityCount);
2106 PSID_IDENTIFIER_AUTHORITY STDCALL RtlIdentifierAuthoritySid (PSID Sid);
2107 NTSTATUS STDCALL RtlInitializeSid (PSID Sid, PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, UCHAR SubAuthorityCount);
2108 PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
2109 BOOLEAN STDCALL RtlEqualPrefixSid (PSID Sid1, PSID Sid2);
2110 BOOLEAN STDCALL RtlEqualSid(PSID Sid1, PSID Sid2);
2111 PSID STDCALL RtlFreeSid (PSID Sid);
2112 ULONG STDCALL RtlLengthSid (PSID Sid);
2113 PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
2114 PUCHAR STDCALL RtlSubAuthorityCountSid (PSID Sid);
2115 BOOLEAN STDCALL RtlValidSid (PSID Sid);
2116 NTSTATUS STDCALL RtlConvertSidToUnicodeString (PUNICODE_STRING String, PSID Sid, BOOLEAN AllocateBuffer);
2118 BOOLEAN STDCALL RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
2119 BOOLEAN STDCALL RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
2120 VOID STDCALL RtlMapGenericMask (PACCESS_MASK AccessMask, PGENERIC_MAPPING GenericMapping);
2123 RtlRandom (PULONG Seed);
2125 PRTL_SPLAY_LINKS STDCALL
2126 RtlSubtreePredecessor (IN PRTL_SPLAY_LINKS Links);
2128 PRTL_SPLAY_LINKS STDCALL
2129 RtlSubtreeSuccessor (IN PRTL_SPLAY_LINKS Links);
2132 RtlUniform (PULONG Seed);
2134 /* functions exported from NTOSKRNL.EXE which are considered RTL */
2136 #if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
2138 char *_itoa (int value, char *string, int radix);
2139 int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
2140 int _snwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, ...);
2141 int _stricmp(const char *s1, const char *s2);
2142 char * _strlwr(char *x);
2143 int _strnicmp(const char *s1, const char *s2, size_t n);
2144 char * _strnset(char* szToFill, int szFill, size_t sizeMaxFill);
2145 char * _strrev(char *s);
2146 char * _strset(char* szToFill, int szFill);
2147 char * _strupr(char *x);
2148 int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args);
2149 int _wcsicmp (const wchar_t* cs, const wchar_t* ct);
2150 wchar_t * _wcslwr (wchar_t *x);
2151 int _wcsnicmp (const wchar_t * cs,const wchar_t * ct,size_t count);
2152 wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
2153 wchar_t * _wcsrev(wchar_t *s);
2154 wchar_t *_wcsupr(wchar_t *x);
2156 int atoi(const char *str);
2157 long atol(const char *str);
2163 int isxdigit(int c);
2164 size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count);
2165 int mbtowc (wchar_t *wchar, const char *mbchar, size_t count);
2166 void * memchr(const void *s, int c, size_t n);
2167 void * memcpy(void *to, const void *from, size_t count);
2168 void * memmove(void *dest,const void *src, size_t count);
2169 void * memset(void *src, int val, size_t count);
2176 int sprintf(char * buf, const char *fmt, ...);
2177 void srand(unsigned seed);
2178 char * strcat(char *s, const char *append);
2179 char * strchr(const char *s, int c);
2180 int strcmp(const char *s1, const char *s2);
2181 char * strcpy(char *to, const char *from);
2182 size_t strlen(const char *str);
2183 char * strncat(char *dst, const char *src, size_t n);
2184 int strncmp(const char *s1, const char *s2, size_t n);
2185 char *strncpy(char *dst, const char *src, size_t n);
2186 char *strrchr(const char *s, int c);
2187 size_t strspn(const char *s1, const char *s2);
2188 char *strstr(const char *s, const char *find);
2189 int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
2192 wchar_t towlower(wchar_t c);
2193 wchar_t towupper(wchar_t c);
2194 int vsprintf(char *buf, const char *fmt, va_list args);
2195 wchar_t * wcscat(wchar_t *dest, const wchar_t *src);
2196 wchar_t * wcschr(const wchar_t *str, wchar_t ch);
2197 int wcscmp(const wchar_t *cs, const wchar_t *ct);
2198 wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2);
2199 size_t wcscspn(const wchar_t *str,const wchar_t *reject);
2200 size_t wcslen(const wchar_t *s);
2201 wchar_t * wcsncat(wchar_t *dest, const wchar_t *src, size_t count);
2202 int wcsncmp(const wchar_t *cs, const wchar_t *ct, size_t count);
2203 wchar_t * wcsncpy(wchar_t *dest, const wchar_t *src, size_t count);
2204 wchar_t * wcsrchr(const wchar_t *str, wchar_t ch);
2205 size_t wcsspn(const wchar_t *str,const wchar_t *accept);
2206 wchar_t *wcsstr(const wchar_t *s,const wchar_t *b);
2207 size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count);
2208 int wctomb (char *mbchar, wchar_t wchar);
2210 #endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
2212 #endif /* __DDK_RTL_H */