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
389 RtlGetCallersAddress (
390 PVOID * CallersAddress
395 RtlQueryRegistryValues (
398 IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
405 RtlWriteRegistryValue (
415 RtlDeleteRegistryValue(IN ULONG RelativeTo,
420 RtlMoveMemory (PVOID Destination, CONST VOID* Source, ULONG Length);
423 RtlEqualLuid(IN PLUID Luid1,
435 RtlZeroMemory (PVOID Destination, ULONG Length);
437 #else /* __USE_W32API */
439 #include <ddk/ntifs.h>
441 #endif /* __USE_W32API */
445 * PURPOSE: Used with RtlCheckRegistryKey, RtlCreateRegistryKey,
446 * RtlDeleteRegistryKey
448 #define RTL_REGISTRY_ABSOLUTE 0
449 #define RTL_REGISTRY_SERVICES 1
450 #define RTL_REGISTRY_CONTROL 2
451 #define RTL_REGISTRY_WINDOWS_NT 3
452 #define RTL_REGISTRY_DEVICEMAP 4
453 #define RTL_REGISTRY_USER 5
454 #define RTL_REGISTRY_ENUM 6 // ReactOS specific: Used internally in kernel only
455 #define RTL_REGISTRY_MAXIMUM 7
457 #define RTL_REGISTRY_HANDLE 0x40000000
458 #define RTL_REGISTRY_OPTIONAL 0x80000000
461 #define SHORT_SIZE (sizeof(USHORT))
462 #define SHORT_MASK (SHORT_SIZE-1)
463 #define LONG_SIZE (sizeof(ULONG))
464 #define LONG_MASK (LONG_SIZE-1)
465 #define LOWBYTE_MASK 0x00FF
467 #define FIRSTBYTE(Value) ((Value) & LOWBYTE_MASK)
468 #define SECONDBYTE(Value) (((Value) >> 8) & LOWBYTE_MASK)
469 #define THIRDBYTE(Value) (((Value) >> 16) & LOWBYTE_MASK)
470 #define FOURTHBYTE(Value) (((Value) >> 24) & LOWBYTE_MASK)
472 /* FIXME: reverse byte-order on big-endian machines (e.g. MIPS) */
473 #define SHORT_LEAST_SIGNIFICANT_BIT 0
474 #define SHORT_MOST_SIGNIFICANT_BIT 1
476 #define LONG_LEAST_SIGNIFICANT_BIT 0
477 #define LONG_3RD_MOST_SIGNIFICANT_BIT 1
478 #define LONG_2RD_MOST_SIGNIFICANT_BIT 2
479 #define LONG_MOST_SIGNIFICANT_BIT 3
483 #if defined(__NTOSKRNL__) || defined(__NTDLL__)
484 #define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
485 #define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
487 #define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag)
488 #define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag)
489 #endif /* __NTOSKRNL__ || __NTDLL__ */
491 extern BOOLEAN NLS_MB_CODE_PAGE_TAG;
492 extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG;
496 * NOTE: ReactOS extensions
498 #define RtlMin(X,Y) (((X) < (Y))? (X) : (Y))
499 #define RtlMax(X,Y) (((X) > (Y))? (X) : (Y))
500 #define RtlMin3(X,Y,Z) (((X) < (Y)) ? RtlMin(X,Z) : RtlMin(Y,Z))
501 #define RtlMax3(X,Y,Z) (((X) > (Y)) ? RtlMax(X,Z) : RtlMax(Y,Z))
506 * InitializeUnicodeString(PUNICODE_STRING DestinationString,
508 * USHORT MaximumLength,
511 * Initialize n UNICODE_STRING from its fields. Use when you know the values of
512 * all the fields in advance
515 #define InitializeUnicodeString(__PDEST_STRING__,__LENGTH__,__MAXLENGTH__,__BUFFER__) \
517 (__PDEST_STRING__)->Length = (__LENGTH__); \
518 (__PDEST_STRING__)->MaximumLength = (__MAXLENGTH__); \
519 (__PDEST_STRING__)->Buffer = (__BUFFER__); \
525 * RtlInitUnicodeStringFromLiteral(PUNICODE_STRING DestinationString,
526 * PCWSTR SourceString);
528 * Initialize a UNICODE_STRING from a wide string literal. WARNING: use only with
529 * string literals and statically initialized arrays, it will calculate the wrong
533 #define RtlInitUnicodeStringFromLiteral(__PDEST_STRING__,__SOURCE_STRING__) \
534 InitializeUnicodeString( \
535 (__PDEST_STRING__), \
536 sizeof(__SOURCE_STRING__) - sizeof(WCHAR), \
537 sizeof(__SOURCE_STRING__), \
538 (__SOURCE_STRING__) \
543 * Static initializer for UNICODE_STRING variables.
546 * UNICODE_STRING wstr = UNICODE_STRING_INITIALIZER(L"string");
549 #define UNICODE_STRING_INITIALIZER(__SOURCE_STRING__) \
551 sizeof((__SOURCE_STRING__)) - sizeof(WCHAR), \
552 sizeof((__SOURCE_STRING__)), \
553 (__SOURCE_STRING__) \
558 * Initializer for empty UNICODE_STRING variables.
561 * UNICODE_STRING wstr = EMPTY_UNICODE_STRING;
564 #define EMPTY_UNICODE_STRING {0, 0, NULL}
570 PSINGLE_LIST_ENTRY ListHead,
571 PSINGLE_LIST_ENTRY Entry
575 #define PushEntryList(ListHead,Entry) \
576 (Entry)->Next = (ListHead)->Next; \
577 (ListHead)->Next = (Entry)
585 * An ReactOS extension
591 PSLIST_HEADER ListHead
594 PSINGLE_LIST_ENTRY ListEntry;
596 ListEntry = ListHead->s.Next.Next;
599 ListHead->s.Next.Next = ListEntry->Next;
601 ListHead->s.Sequence++;
608 * An ReactOS extension
614 PSLIST_HEADER ListHead,
615 PSINGLE_LIST_ENTRY Entry
618 Entry->Next = ListHead->s.Next.Next;
619 ListHead->s.Next.Next = Entry;
621 ListHead->s.Sequence++;
624 #else /* __USE_W32API */
627 * An ReactOS extension
633 PSLIST_HEADER ListHead
636 PSINGLE_LIST_ENTRY ListEntry;
638 ListEntry = ListHead->Next.Next;
641 ListHead->Next.Next = ListEntry->Next;
643 ListHead->Sequence++;
650 * An ReactOS extension
656 PSLIST_HEADER ListHead,
657 PSINGLE_LIST_ENTRY Entry
660 Entry->Next = ListHead->Next.Next;
661 ListHead->Next.Next = Entry;
663 ListHead->Sequence++;
666 #endif /* __USE_W32API */
671 RtlAddAtomToAtomTable (
672 IN PRTL_ATOM_TABLE AtomTable,
686 RtlAnsiCharToUnicodeChar (
692 RtlAnsiStringToUnicodeSize (
693 PANSI_STRING AnsiString
698 RtlAnsiStringToUnicodeString (
699 PUNICODE_STRING DestinationString,
700 PANSI_STRING SourceString,
701 BOOLEAN AllocateDestinationString
706 RtlAppendAsciizToString(
713 RtlAppendStringToString (
720 RtlAppendUnicodeStringToString (
721 PUNICODE_STRING Destination,
722 PUNICODE_STRING Source
728 PRTL_BITMAP BitMapHeader,
736 PRTL_BITMAP BitMapHeader,
744 PVOID FailedAssertion,
760 RtlCheckRegistryKey (
768 IN PRTL_BITMAP BitMapHeader
774 IN PRTL_BITMAP BitMapHeader,
775 IN ULONG StartingIndex,
776 IN ULONG NumberToClear
791 BOOLEAN CaseInsensitive
796 RtlCompareUnicodeString (
797 PUNICODE_STRING String1,
798 PUNICODE_STRING String2,
799 BOOLEAN CaseInsensitive
803 RtlCompressBuffer(IN USHORT CompressionFormatAndEngine,
804 IN PUCHAR UncompressedBuffer,
805 IN ULONG UncompressedBufferSize,
806 OUT PUCHAR CompressedBuffer,
807 IN ULONG CompressedBufferSize,
808 IN ULONG UncompressedChunkSize,
809 OUT PULONG FinalCompressedSize,
813 RtlCompressChunks(IN PUCHAR UncompressedBuffer,
814 IN ULONG UncompressedBufferSize,
815 OUT PUCHAR CompressedBuffer,
816 IN ULONG CompressedBufferSize,
817 IN OUT PCOMPRESSED_DATA_INFO CompressedDataInfo,
818 IN ULONG CompressedDataInfoLength,
821 LARGE_INTEGER STDCALL
822 RtlConvertLongToLargeInteger(IN LONG SignedInteger);
825 RtlConvertSidToUnicodeString(IN OUT PUNICODE_STRING String,
827 IN BOOLEAN AllocateString);
829 LARGE_INTEGER STDCALL
830 RtlConvertUlongToLargeInteger(IN ULONG UnsignedInteger);
848 #define RtlCopyBytes RtlCopyMemory
851 RtlCopyLuid(IN PLUID LuidDest,
855 RtlCopyLuidAndAttributesArray(ULONG Count,
856 PLUID_AND_ATTRIBUTES Src,
857 PLUID_AND_ATTRIBUTES Dest);
860 RtlCopySid(ULONG BufferLength,
865 RtlCopySidAndAttributesArray(ULONG Count,
866 PSID_AND_ATTRIBUTES Src,
868 PSID_AND_ATTRIBUTES Dest,
870 PVOID* RemainingSidArea,
871 PULONG RemainingSidAreaSize);
874 RtlCopyString(PSTRING DestinationString,
875 PSTRING SourceString);
878 RtlCopyUnicodeString(PUNICODE_STRING DestinationString,
879 PUNICODE_STRING SourceString);
882 RtlCreateAtomTable(IN ULONG TableSize,
883 IN OUT PRTL_ATOM_TABLE *AtomTable);
890 ULONG SizeToReserve, // dwMaximumSize
891 ULONG SizeToCommit, // dwInitialSize
893 PRTL_HEAP_DEFINITION Definition
898 RtlCreateRegistryKey (
905 RtlCreateSecurityDescriptor (
906 PSECURITY_DESCRIPTOR SecurityDescriptor,
912 RtlCreateUnicodeString (
913 OUT PUNICODE_STRING Destination,
918 RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination,
923 RtlCustomCPToUnicodeN (
924 PRTL_NLS_DATA NlsData,
925 PWCHAR UnicodeString,
933 RtlDecompressBuffer(IN USHORT CompressionFormat,
934 OUT PUCHAR UncompressedBuffer,
935 IN ULONG UncompressedBufferSize,
936 IN PUCHAR CompressedBuffer,
937 IN ULONG CompressedBufferSize,
938 OUT PULONG FinalUncompressedSize);
941 RtlDecompressChunks(OUT PUCHAR UncompressedBuffer,
942 IN ULONG UncompressedBufferSize,
943 IN PUCHAR CompressedBuffer,
944 IN ULONG CompressedBufferSize,
945 IN PUCHAR CompressedTail,
946 IN ULONG CompressedTailSize,
947 IN PCOMPRESSED_DATA_INFO CompressedDataInfo);
950 RtlDecompressFragment(IN USHORT CompressionFormat,
951 OUT PUCHAR UncompressedFragment,
952 IN ULONG UncompressedFragmentSize,
953 IN PUCHAR CompressedBuffer,
954 IN ULONG CompressedBufferSize,
955 IN ULONG FragmentOffset,
956 OUT PULONG FinalUncompressedSize,
960 RtlDeleteAtomFromAtomTable(IN PRTL_ATOM_TABLE AtomTable,
964 RtlDescribeChunk(IN USHORT CompressionFormat,
965 IN OUT PUCHAR *CompressedBuffer,
966 IN PUCHAR EndOfCompressedBufferPlus1,
967 OUT PUCHAR *ChunkBuffer,
968 OUT PULONG ChunkSize);
971 RtlDestroyAtomTable(IN PRTL_ATOM_TABLE AtomTable);
974 RtlDestroyHeap(HANDLE hheap);
978 RtlDowncaseUnicodeString (
979 IN OUT PUNICODE_STRING DestinationString,
980 IN PUNICODE_STRING SourceString,
981 IN BOOLEAN AllocateDestinationString
987 IN PRTL_ATOM_TABLE AtomTable,
988 IN BOOLEAN DeletePinned
993 RtlEnlargedIntegerMultiply (
1000 RtlEnlargedUnsignedDivide (
1001 ULARGE_INTEGER Dividend,
1008 RtlEnlargedUnsignedMultiply (
1018 BOOLEAN CaseInSensitive
1023 RtlExtendedIntegerMultiply (
1024 LARGE_INTEGER Multiplicand,
1030 RtlExtendedLargeIntegerDivide (
1031 LARGE_INTEGER Dividend,
1038 RtlExtendedMagicDivide (
1039 LARGE_INTEGER Dividend,
1040 LARGE_INTEGER MagicDivisor,
1046 RtlFillMemoryUlong (
1055 PRTL_BITMAP BitMapHeader,
1062 RtlFindClearBitsAndSet (
1063 PRTL_BITMAP BitMapHeader,
1070 RtlFindFirstRunClear (
1071 PRTL_BITMAP BitMapHeader,
1072 PULONG StartingIndex
1077 RtlFindFirstRunSet (
1078 PRTL_BITMAP BitMapHeader,
1079 PULONG StartingIndex
1084 RtlFindLongestRunClear (
1085 PRTL_BITMAP BitMapHeader,
1086 PULONG StartingIndex
1091 RtlFindLongestRunSet (
1092 PRTL_BITMAP BitMapHeader,
1093 PULONG StartingIndex
1099 IN PVOID BaseAddress,
1103 OUT PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry
1109 PRTL_BITMAP BitMapHeader,
1116 RtlFindSetBitsAndClear (
1117 PRTL_BITMAP BitMapHeader,
1124 RtlFormatCurrentUserKeyPath (
1125 IN OUT PUNICODE_STRING KeyPath
1131 PANSI_STRING AnsiString
1145 POEM_STRING OemString
1150 RtlFreeUnicodeString (
1151 PUNICODE_STRING UnicodeString
1155 RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
1156 IN BOOLEAN AllowExtendedCharacters,
1157 IN OUT PGENERATE_NAME_CONTEXT Context,
1158 OUT PUNICODE_STRING Name8dot3);
1161 RtlGetCompressionWorkSpaceSize(IN USHORT CompressionFormatAndEngine,
1162 OUT PULONG CompressBufferAndWorkSpaceSize,
1163 OUT PULONG CompressFragmentWorkSpaceSize);
1167 RtlGetDefaultCodePage (
1168 PUSHORT AnsiCodePage,
1174 RtlImageDirectoryEntryToData (
1187 PIMAGE_SECTION_HEADER
1189 RtlImageRvaToSection (
1190 PIMAGE_NT_HEADERS NtHeader,
1198 PIMAGE_NT_HEADERS NtHeader,
1201 PIMAGE_SECTION_HEADER *SectionHeader
1207 PANSI_STRING DestinationString,
1214 PSTRING DestinationString,
1220 RtlInitUnicodeString (
1221 PUNICODE_STRING DestinationString,
1227 RtlInitializeBitMap (
1228 IN OUT PRTL_BITMAP BitMapHeader,
1229 IN PULONG BitMapBuffer,
1230 IN ULONG SizeOfBitMap
1235 RtlInitializeContext (
1236 IN HANDLE ProcessHandle,
1237 IN PCONTEXT Context,
1239 IN PTHREAD_START_ROUTINE StartAddress,
1240 IN OUT PUSER_STACK UserStack
1245 RtlInitializeGenericTable (
1246 IN OUT PRTL_GENERIC_TABLE Table,
1247 IN PVOID CompareRoutine,
1248 IN PVOID AllocateRoutine,
1249 IN PVOID FreeRoutine,
1250 IN ULONG UserParameter
1255 RtlInsertElementGenericTable (
1256 IN OUT PRTL_GENERIC_TABLE Table,
1258 IN ULONG ElementSize,
1273 RtlIntegerToUnicodeString (
1276 IN OUT PUNICODE_STRING String
1281 RtlIsGenericTableEmpty (
1282 IN PRTL_GENERIC_TABLE Table
1286 RtlIsNameLegalDOS8Dot3(IN PUNICODE_STRING UnicodeName,
1287 IN PANSI_STRING AnsiName,
1288 OUT PBOOLEAN SpacesFound);
1291 RtlIsTextUnicode (PVOID Buffer,
1297 RtlLargeIntegerAdd (
1298 LARGE_INTEGER Addend1,
1299 LARGE_INTEGER Addend2
1304 * RtlLargeIntegerAnd (
1305 * PLARGE_INTEGER Result,
1306 * LARGE_INTEGER Source,
1307 * LARGE_INTEGER Mask
1310 #define RtlLargeIntegerAnd(Result, Source, Mask) \
1312 Result.HighPart = Source.HighPart & Mask.HighPart; \
1313 Result.LowPart = Source.LowPart & Mask.LowPart; \
1318 RtlLargeIntegerArithmeticShift (
1319 LARGE_INTEGER LargeInteger,
1325 RtlLargeIntegerDivide (
1326 LARGE_INTEGER Dividend,
1327 LARGE_INTEGER Divisor,
1328 PLARGE_INTEGER Remainder
1333 * RtlLargeIntegerEqualTo (
1334 * LARGE_INTEGER Operand1,
1335 * LARGE_INTEGER Operand2
1338 #define RtlLargeIntegerEqualTo(X,Y) \
1339 (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1343 * RtlLargeIntegerEqualToZero (
1344 * LARGE_INTEGER Operand
1347 #define RtlLargeIntegerEqualToZero(X) \
1348 (!((X).LowPart | (X).HighPart))
1352 * RtlLargeIntegerGreaterThan (
1353 * LARGE_INTEGER Operand1,
1354 * LARGE_INTEGER Operand2
1357 #define RtlLargeIntegerGreaterThan(X,Y) \
1358 ((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
1359 ((X).HighPart > (Y).HighPart))
1363 * RtlLargeIntegerGreaterThanOrEqualTo (
1364 * LARGE_INTEGER Operand1,
1365 * LARGE_INTEGER Operand2
1368 #define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
1369 ((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
1370 ((X).HighPart > (Y).HighPart))
1374 * RtlLargeIntegerGreaterThanOrEqualToZero (
1375 * LARGE_INTEGER Operand1
1378 #define RtlLargeIntegerGreaterOrEqualToZero(X) \
1383 * RtlLargeIntegerGreaterThanZero (
1384 * LARGE_INTEGER Operand1
1387 #define RtlLargeIntegerGreaterThanZero(X) \
1388 ((((X).HighPart == 0) && ((X).LowPart > 0)) || \
1389 ((X).HighPart > 0 ))
1393 * RtlLargeIntegerLessThan (
1394 * LARGE_INTEGER Operand1,
1395 * LARGE_INTEGER Operand2
1398 #define RtlLargeIntegerLessThan(X,Y) \
1399 ((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
1400 ((X).HighPart < (Y).HighPart))
1404 * RtlLargeIntegerLessThanOrEqualTo (
1405 * LARGE_INTEGER Operand1,
1406 * LARGE_INTEGER Operand2
1409 #define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
1410 ((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
1411 ((X).HighPart < (Y).HighPart))
1415 * RtlLargeIntegerLessThanOrEqualToZero (
1416 * LARGE_INTEGER Operand
1419 #define RtlLargeIntegerLessOrEqualToZero(X) \
1420 (((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
1424 * RtlLargeIntegerLessThanZero (
1425 * LARGE_INTEGER Operand
1428 #define RtlLargeIntegerLessThanZero(X) \
1429 (((X).HighPart < 0))
1433 RtlLargeIntegerNegate (
1434 LARGE_INTEGER Subtrahend
1439 * RtlLargeIntegerNotEqualTo (
1440 * LARGE_INTEGER Operand1,
1441 * LARGE_INTEGER Operand2
1444 #define RtlLargeIntegerNotEqualTo(X,Y) \
1445 ((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1449 * RtlLargeIntegerNotEqualToZero (
1450 * LARGE_INTEGER Operand
1453 #define RtlLargeIntegerNotEqualToZero(X) \
1454 (((X).LowPart | (X).HighPart))
1458 RtlLargeIntegerShiftLeft (
1459 LARGE_INTEGER LargeInteger,
1465 RtlLargeIntegerShiftRight (
1466 LARGE_INTEGER LargeInteger,
1472 RtlLargeIntegerSubtract (
1473 LARGE_INTEGER Minuend,
1474 LARGE_INTEGER Subtrahend
1479 RtlLengthSecurityDescriptor (
1480 PSECURITY_DESCRIPTOR SecurityDescriptor
1491 RtlLookupAtomInAtomTable (
1492 IN PRTL_ATOM_TABLE AtomTable,
1499 RtlMultiByteToUnicodeN (
1500 PWCHAR UnicodeString,
1509 RtlMultiByteToUnicodeSize (
1517 RtlNtStatusToDosError (
1523 RtlNtStatusToDosErrorNoTeb (
1529 RtlNtStatusToPsxErrno (
1535 RtlNumberGenericTableElements (
1536 IN PRTL_GENERIC_TABLE Table
1541 RtlNumberOfClearBits (
1542 PRTL_BITMAP BitMapHeader
1547 RtlNumberOfSetBits (
1548 PRTL_BITMAP BitMapHeader
1553 RtlOemStringToUnicodeSize (
1554 POEM_STRING AnsiString
1559 RtlOemStringToUnicodeString (
1560 PUNICODE_STRING DestinationString,
1561 POEM_STRING SourceString,
1562 BOOLEAN AllocateDestinationString
1568 PWCHAR UnicodeString,
1576 RtlPinAtomInAtomTable (
1577 IN PRTL_ATOM_TABLE AtomTable,
1584 PANSI_STRING String1,
1585 PANSI_STRING String2,
1586 BOOLEAN CaseInsensitive
1591 RtlPrefixUnicodeString (
1592 PUNICODE_STRING String1,
1593 PUNICODE_STRING String2,
1594 BOOLEAN CaseInsensitive
1599 RtlQueryAtomInAtomTable (
1600 IN PRTL_ATOM_TABLE AtomTable,
1602 IN OUT PULONG RefCount OPTIONAL,
1603 IN OUT PULONG PinCount OPTIONAL,
1604 IN OUT PWSTR AtomName OPTIONAL,
1605 IN OUT PULONG NameLength OPTIONAL
1610 RtlQueryTimeZoneInformation (
1611 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1617 IN PEXCEPTION_RECORD ExceptionRecord
1630 RtlReserveChunk(IN USHORT CompressionFormat,
1631 IN OUT PUCHAR *CompressedBuffer,
1632 IN PUCHAR EndOfCompressedBufferPlus1,
1633 OUT PUCHAR *ChunkBuffer,
1634 IN ULONG ChunkSize);
1638 * RtlRetrieveUlong (
1639 * PULONG DestinationAddress,
1640 * PULONG SourceAddress
1643 #define RtlRetrieveUlong(DestAddress,SrcAddress) \
1644 if ((ULONG)(SrcAddress) & LONG_MASK) \
1646 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1647 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1648 ((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
1649 ((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
1653 *((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
1658 * RtlRetrieveUshort (
1659 * PUSHORT DestinationAddress,
1660 * PUSHORT SourceAddress
1663 #define RtlRetrieveUshort(DestAddress,SrcAddress) \
1664 if ((ULONG)(SrcAddress) & SHORT_MASK) \
1666 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1667 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1671 *((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
1676 RtlSecondsSince1970ToTime (
1677 ULONG SecondsSince1970,
1683 RtlSecondsSince1980ToTime (
1684 ULONG SecondsSince1980,
1691 IN PRTL_BITMAP BitMapHeader
1697 PRTL_BITMAP BitMapHeader,
1698 ULONG StartingIndex,
1704 RtlSetDaclSecurityDescriptor (
1705 PSECURITY_DESCRIPTOR SecurityDescriptor,
1706 BOOLEAN DaclPresent,
1708 BOOLEAN DaclDefaulted
1713 RtlSetTimeZoneInformation (
1714 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1732 #define RtlStoreUlong(Address,Value) \
1733 if ((ULONG)(Address) & LONG_MASK) \
1735 ((PUCHAR)(Address))[LONG_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1736 ((PUCHAR)(Address))[LONG_3RD_MOST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1737 ((PUCHAR)(Address))[LONG_2ND_MOST_SIGNIFICANT_BIT]=(UCHAR)(THIRDBYTE(Value)); \
1738 ((PUCHAR)(Address))[LONG_MOST_SIGNIFICANT_BIT]=(UCHAR)(FOURTHBYTE(Value)); \
1742 *((PULONG)(Address))=(ULONG)(Value); \
1752 #define RtlStoreUshort(Address,Value) \
1753 if ((ULONG)(Address) & SHORT_MASK) \
1755 ((PUCHAR)(Address))[SHORT_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1756 ((PUCHAR)(Address))[SHORT_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
1760 *((PUSHORT)(Address))=(USHORT)(Value); \
1765 RtlTimeFieldsToTime (
1766 PTIME_FIELDS TimeFields,
1772 RtlTimeToSecondsSince1970 (
1773 PLARGE_INTEGER Time,
1774 PULONG SecondsSince1970
1779 RtlTimeToSecondsSince1980 (
1780 PLARGE_INTEGER Time,
1781 PULONG SecondsSince1980
1786 RtlTimeToTimeFields (
1787 PLARGE_INTEGER Time,
1788 PTIME_FIELDS TimeFields
1793 RtlUnicodeStringToAnsiSize (
1794 IN PUNICODE_STRING UnicodeString
1799 RtlUnicodeStringToAnsiString (
1800 IN OUT PANSI_STRING DestinationString,
1801 IN PUNICODE_STRING SourceString,
1802 IN BOOLEAN AllocateDestinationString
1807 RtlUnicodeStringToInteger (
1808 IN PUNICODE_STRING String,
1815 RtlUnicodeStringToOemSize (
1816 IN PUNICODE_STRING UnicodeString
1821 RtlUnicodeStringToCountedOemString (
1822 IN OUT POEM_STRING DestinationString,
1823 IN PUNICODE_STRING SourceString,
1824 IN BOOLEAN AllocateDestinationString
1829 RtlUnicodeStringToOemString (
1830 IN OUT POEM_STRING DestinationString,
1831 IN PUNICODE_STRING SourceString,
1832 IN BOOLEAN AllocateDestinationString
1837 RtlUnicodeToCustomCPN (
1838 PRTL_NLS_DATA NlsData,
1842 PWCHAR UnicodeString,
1848 RtlUnicodeToMultiByteN (
1852 PWCHAR UnicodeString,
1858 RtlUnicodeToMultiByteSize (
1860 PWCHAR UnicodeString,
1870 PWCHAR UnicodeString,
1883 PEXCEPTION_REGISTRATION RegistrationFrame,
1884 PVOID ReturnAddress,
1885 PEXCEPTION_RECORD ExceptionRecord,
1891 RtlUpcaseUnicodeChar (
1897 RtlUpcaseUnicodeString (
1898 IN OUT PUNICODE_STRING DestinationString,
1899 IN PUNICODE_STRING SourceString,
1900 IN BOOLEAN AllocateDestinationString
1905 RtlUpcaseUnicodeStringToAnsiString (
1906 IN OUT PANSI_STRING DestinationString,
1907 IN PUNICODE_STRING SourceString,
1908 IN BOOLEAN AllocateDestinationString
1913 RtlUpcaseUnicodeStringToCountedOemString (
1914 IN OUT POEM_STRING DestinationString,
1915 IN PUNICODE_STRING SourceString,
1916 IN BOOLEAN AllocateDestinationString
1921 RtlUpcaseUnicodeStringToOemString (
1922 IN OUT POEM_STRING DestinationString,
1923 IN PUNICODE_STRING SourceString,
1924 IN BOOLEAN AllocateDestinationString
1929 RtlUpcaseUnicodeToCustomCPN (
1930 PRTL_NLS_DATA NlsData,
1934 PWCHAR UnicodeString,
1940 RtlUpcaseUnicodeToMultiByteN (
1944 PWCHAR UnicodeString,
1950 RtlUpcaseUnicodeToOemN (
1954 PWCHAR UnicodeString,
1967 PSTRING DestinationString,
1968 PSTRING SourceString
1981 RtlValidSecurityDescriptor (
1982 PSECURITY_DESCRIPTOR SecurityDescriptor
1986 RtlValidSid(IN PSID Sid);
1990 RtlxAnsiStringToUnicodeSize (
1991 IN PANSI_STRING AnsiString
1996 RtlxOemStringToUnicodeSize (
1997 IN POEM_STRING OemString
2002 RtlxUnicodeStringToAnsiSize (
2003 IN PUNICODE_STRING UnicodeString
2008 RtlxUnicodeStringToOemSize (
2009 IN PUNICODE_STRING UnicodeString
2013 /* Register io functions */
2017 READ_REGISTER_UCHAR (
2023 READ_REGISTER_USHORT (
2029 READ_REGISTER_ULONG (
2035 READ_REGISTER_BUFFER_UCHAR (
2043 READ_REGISTER_BUFFER_USHORT (
2051 READ_REGISTER_BUFFER_ULONG (
2059 WRITE_REGISTER_UCHAR (
2066 WRITE_REGISTER_USHORT (
2073 WRITE_REGISTER_ULONG (
2080 WRITE_REGISTER_BUFFER_UCHAR (
2088 WRITE_REGISTER_BUFFER_USHORT (
2096 WRITE_REGISTER_BUFFER_ULONG (
2103 NTSTATUS STDCALL RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision);
2104 NTSTATUS STDCALL RtlQueryInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
2105 NTSTATUS STDCALL RtlSetInformationAcl (PACL Acl, PVOID Information, ULONG InformationLength, ACL_INFORMATION_CLASS InformationClass);
2106 BOOLEAN STDCALL RtlValidAcl (PACL Acl);
2108 NTSTATUS STDCALL RtlAddAccessAllowedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
2109 NTSTATUS STDCALL RtlAddAccessDeniedAce(PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid);
2110 NTSTATUS STDCALL RtlAddAce(PACL Acl, ULONG Revision, ULONG StartingIndex, PACE AceList, ULONG AceListLength);
2111 NTSTATUS STDCALL RtlAddAuditAccessAce (PACL Acl, ULONG Revision, ACCESS_MASK AccessMask, PSID Sid, BOOLEAN Success, BOOLEAN Failure);
2112 NTSTATUS STDCALL RtlDeleteAce(PACL Acl, ULONG AceIndex);
2113 BOOLEAN STDCALL RtlFirstFreeAce(PACL Acl, PACE* Ace);
2114 NTSTATUS STDCALL RtlGetAce(PACL Acl, ULONG AceIndex, PACE *Ace);
2116 NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
2117 NTSTATUS STDCALL RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, PULONG BufferLength);
2118 NTSTATUS STDCALL RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG Revision);
2119 BOOLEAN STDCALL RtlValidSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
2120 ULONG STDCALL RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor);
2121 NTSTATUS STDCALL RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN DaclPresent, PACL Dacl, BOOLEAN DaclDefaulted);
2122 NTSTATUS STDCALL RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN DaclPresent, PACL* Dacl, PBOOLEAN DaclDefauted);
2123 NTSTATUS STDCALL RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Owner, BOOLEAN OwnerDefaulted);
2124 NTSTATUS STDCALL RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Owner, PBOOLEAN OwnerDefaulted);
2125 NTSTATUS STDCALL RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Group, BOOLEAN GroupDefaulted);
2126 NTSTATUS STDCALL RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Group, PBOOLEAN GroupDefaulted);
2127 NTSTATUS STDCALL RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSECURITY_DESCRIPTOR_CONTROL Control, PULONG Revision);
2128 NTSTATUS STDCALL RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN SaclPresent, PACL Sacl, BOOLEAN SaclDefaulted);
2129 NTSTATUS STDCALL RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PBOOLEAN SaclPresent, PACL* Sacl, PBOOLEAN SaclDefauted);
2130 NTSTATUS STDCALL RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD,
2131 PSECURITY_DESCRIPTOR AbsSD,
2142 NTSTATUS STDCALL RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
2143 UCHAR SubAuthorityCount,
2144 ULONG SubAuthority0,
2145 ULONG SubAuthority1,
2146 ULONG SubAuthority2,
2147 ULONG SubAuthority3,
2148 ULONG SubAuthority4,
2149 ULONG SubAuthority5,
2150 ULONG SubAuthority6,
2151 ULONG SubAuthority7,
2153 ULONG STDCALL RtlLengthRequiredSid (UCHAR SubAuthorityCount);
2154 PSID_IDENTIFIER_AUTHORITY STDCALL RtlIdentifierAuthoritySid (PSID Sid);
2155 NTSTATUS STDCALL RtlInitializeSid (PSID Sid, PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, UCHAR SubAuthorityCount);
2156 PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
2157 BOOLEAN STDCALL RtlEqualPrefixSid (PSID Sid1, PSID Sid2);
2158 BOOLEAN STDCALL RtlEqualSid(PSID Sid1, PSID Sid2);
2159 PSID STDCALL RtlFreeSid (PSID Sid);
2160 ULONG STDCALL RtlLengthSid (PSID Sid);
2161 PULONG STDCALL RtlSubAuthoritySid (PSID Sid, ULONG SubAuthority);
2162 PUCHAR STDCALL RtlSubAuthorityCountSid (PSID Sid);
2163 BOOLEAN STDCALL RtlValidSid (PSID Sid);
2164 NTSTATUS STDCALL RtlConvertSidToUnicodeString (PUNICODE_STRING String, PSID Sid, BOOLEAN AllocateBuffer);
2166 BOOLEAN STDCALL RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
2167 BOOLEAN STDCALL RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess);
2168 VOID STDCALL RtlMapGenericMask (PACCESS_MASK AccessMask, PGENERIC_MAPPING GenericMapping);
2171 /* functions exported from NTOSKRNL.EXE which are considered RTL */
2173 #if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
2175 char *_itoa (int value, char *string, int radix);
2176 int _snprintf(char * buf, size_t cnt, const char *fmt, ...);
2177 int _snwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, ...);
2178 int _stricmp(const char *s1, const char *s2);
2179 char * _strlwr(char *x);
2180 int _strnicmp(const char *s1, const char *s2, size_t n);
2181 char * _strnset(char* szToFill, int szFill, size_t sizeMaxFill);
2182 char * _strrev(char *s);
2183 char * _strset(char* szToFill, int szFill);
2184 char * _strupr(char *x);
2185 int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args);
2186 int _wcsicmp (const wchar_t* cs, const wchar_t* ct);
2187 wchar_t * _wcslwr (wchar_t *x);
2188 int _wcsnicmp (const wchar_t * cs,const wchar_t * ct,size_t count);
2189 wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill);
2190 wchar_t * _wcsrev(wchar_t *s);
2191 wchar_t *_wcsupr(wchar_t *x);
2193 int atoi(const char *str);
2194 long atol(const char *str);
2200 int isxdigit(int c);
2201 size_t mbstowcs (wchar_t *wcstr, const char *mbstr, size_t count);
2202 int mbtowc (wchar_t *wchar, const char *mbchar, size_t count);
2203 void * memchr(const void *s, int c, size_t n);
2204 void * memcpy(void *to, const void *from, size_t count);
2205 void * memmove(void *dest,const void *src, size_t count);
2206 void * memset(void *src, int val, size_t count);
2213 int sprintf(char * buf, const char *fmt, ...);
2214 void srand(unsigned seed);
2215 char * strcat(char *s, const char *append);
2216 char * strchr(const char *s, int c);
2217 int strcmp(const char *s1, const char *s2);
2218 char * strcpy(char *to, const char *from);
2219 size_t strlen(const char *str);
2220 char * strncat(char *dst, const char *src, size_t n);
2221 int strncmp(const char *s1, const char *s2, size_t n);
2222 char *strncpy(char *dst, const char *src, size_t n);
2223 char *strrchr(const char *s, int c);
2224 size_t strspn(const char *s1, const char *s2);
2225 char *strstr(const char *s, const char *find);
2226 int swprintf(wchar_t *buf, const wchar_t *fmt, ...);
2229 wchar_t towlower(wchar_t c);
2230 wchar_t towupper(wchar_t c);
2231 int vsprintf(char *buf, const char *fmt, va_list args);
2232 wchar_t * wcscat(wchar_t *dest, const wchar_t *src);
2233 wchar_t * wcschr(const wchar_t *str, wchar_t ch);
2234 int wcscmp(const wchar_t *cs, const wchar_t *ct);
2235 wchar_t* wcscpy(wchar_t* str1, const wchar_t* str2);
2236 size_t wcscspn(const wchar_t *str,const wchar_t *reject);
2237 size_t wcslen(const wchar_t *s);
2238 wchar_t * wcsncat(wchar_t *dest, const wchar_t *src, size_t count);
2239 int wcsncmp(const wchar_t *cs, const wchar_t *ct, size_t count);
2240 wchar_t * wcsncpy(wchar_t *dest, const wchar_t *src, size_t count);
2241 wchar_t * wcsrchr(const wchar_t *str, wchar_t ch);
2242 size_t wcsspn(const wchar_t *str,const wchar_t *accept);
2243 wchar_t *wcsstr(const wchar_t *s,const wchar_t *b);
2244 size_t wcstombs (char *mbstr, const wchar_t *wcstr, size_t count);
2245 int wctomb (char *mbchar, wchar_t wchar);
2247 #endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
2249 #endif /* __DDK_RTL_H */