1 /* $Id: rtl.h,v 1.9 2003/05/16 17:33:51 ekohl Exp $
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 IN PCPTABLEINFO CustomCP
,
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 (
1184 IN PVOID BaseAddress
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
,
1213 RtlInitCodePageTable (
1214 IN PUSHORT TableBase
,
1215 OUT PCPTABLEINFO CodePageTable
1221 IN PUSHORT AnsiTableBase
,
1222 IN PUSHORT OemTableBase
,
1223 IN PUSHORT CaseTableBase
,
1224 OUT PNLSTABLEINFO NlsTable
1230 PSTRING DestinationString
,
1236 RtlInitUnicodeString (
1237 PUNICODE_STRING DestinationString
,
1243 RtlInitializeBitMap (
1244 IN OUT PRTL_BITMAP BitMapHeader
,
1245 IN PULONG BitMapBuffer
,
1246 IN ULONG SizeOfBitMap
1251 RtlInitializeContext (
1252 IN HANDLE ProcessHandle
,
1253 IN PCONTEXT Context
,
1255 IN PTHREAD_START_ROUTINE StartAddress
,
1256 IN OUT PUSER_STACK UserStack
1261 RtlInitializeGenericTable (
1262 IN OUT PRTL_GENERIC_TABLE Table
,
1263 IN PVOID CompareRoutine
,
1264 IN PVOID AllocateRoutine
,
1265 IN PVOID FreeRoutine
,
1266 IN ULONG UserParameter
1271 RtlInsertElementGenericTable (
1272 IN OUT PRTL_GENERIC_TABLE Table
,
1274 IN ULONG ElementSize
,
1289 RtlIntegerToUnicodeString (
1292 IN OUT PUNICODE_STRING String
1297 RtlIsGenericTableEmpty (
1298 IN PRTL_GENERIC_TABLE Table
1303 RtlIsNameLegalDOS8Dot3 (
1304 IN PUNICODE_STRING UnicodeName
,
1305 IN PANSI_STRING AnsiName
,
1306 OUT PBOOLEAN SpacesFound
1319 RtlLargeIntegerAdd (
1320 LARGE_INTEGER Addend1
,
1321 LARGE_INTEGER Addend2
1326 * RtlLargeIntegerAnd (
1327 * PLARGE_INTEGER Result,
1328 * LARGE_INTEGER Source,
1329 * LARGE_INTEGER Mask
1332 #define RtlLargeIntegerAnd(Result, Source, Mask) \
1334 Result.HighPart = Source.HighPart & Mask.HighPart; \
1335 Result.LowPart = Source.LowPart & Mask.LowPart; \
1340 RtlLargeIntegerArithmeticShift (
1341 LARGE_INTEGER LargeInteger
,
1347 RtlLargeIntegerDivide (
1348 LARGE_INTEGER Dividend
,
1349 LARGE_INTEGER Divisor
,
1350 PLARGE_INTEGER Remainder
1355 * RtlLargeIntegerEqualTo (
1356 * LARGE_INTEGER Operand1,
1357 * LARGE_INTEGER Operand2
1360 #define RtlLargeIntegerEqualTo(X,Y) \
1361 (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1365 * RtlLargeIntegerEqualToZero (
1366 * LARGE_INTEGER Operand
1369 #define RtlLargeIntegerEqualToZero(X) \
1370 (!((X).LowPart | (X).HighPart))
1374 * RtlLargeIntegerGreaterThan (
1375 * LARGE_INTEGER Operand1,
1376 * LARGE_INTEGER Operand2
1379 #define RtlLargeIntegerGreaterThan(X,Y) \
1380 ((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
1381 ((X).HighPart > (Y).HighPart))
1385 * RtlLargeIntegerGreaterThanOrEqualTo (
1386 * LARGE_INTEGER Operand1,
1387 * LARGE_INTEGER Operand2
1390 #define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
1391 ((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
1392 ((X).HighPart > (Y).HighPart))
1396 * RtlLargeIntegerGreaterThanOrEqualToZero (
1397 * LARGE_INTEGER Operand1
1400 #define RtlLargeIntegerGreaterOrEqualToZero(X) \
1405 * RtlLargeIntegerGreaterThanZero (
1406 * LARGE_INTEGER Operand1
1409 #define RtlLargeIntegerGreaterThanZero(X) \
1410 ((((X).HighPart == 0) && ((X).LowPart > 0)) || \
1411 ((X).HighPart > 0 ))
1415 * RtlLargeIntegerLessThan (
1416 * LARGE_INTEGER Operand1,
1417 * LARGE_INTEGER Operand2
1420 #define RtlLargeIntegerLessThan(X,Y) \
1421 ((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
1422 ((X).HighPart < (Y).HighPart))
1426 * RtlLargeIntegerLessThanOrEqualTo (
1427 * LARGE_INTEGER Operand1,
1428 * LARGE_INTEGER Operand2
1431 #define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
1432 ((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
1433 ((X).HighPart < (Y).HighPart))
1437 * RtlLargeIntegerLessThanOrEqualToZero (
1438 * LARGE_INTEGER Operand
1441 #define RtlLargeIntegerLessOrEqualToZero(X) \
1442 (((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
1446 * RtlLargeIntegerLessThanZero (
1447 * LARGE_INTEGER Operand
1450 #define RtlLargeIntegerLessThanZero(X) \
1451 (((X).HighPart < 0))
1455 RtlLargeIntegerNegate (
1456 LARGE_INTEGER Subtrahend
1461 * RtlLargeIntegerNotEqualTo (
1462 * LARGE_INTEGER Operand1,
1463 * LARGE_INTEGER Operand2
1466 #define RtlLargeIntegerNotEqualTo(X,Y) \
1467 ((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1471 * RtlLargeIntegerNotEqualToZero (
1472 * LARGE_INTEGER Operand
1475 #define RtlLargeIntegerNotEqualToZero(X) \
1476 (((X).LowPart | (X).HighPart))
1480 RtlLargeIntegerShiftLeft (
1481 LARGE_INTEGER LargeInteger
,
1487 RtlLargeIntegerShiftRight (
1488 LARGE_INTEGER LargeInteger
,
1494 RtlLargeIntegerSubtract (
1495 LARGE_INTEGER Minuend
,
1496 LARGE_INTEGER Subtrahend
1501 RtlLengthSecurityDescriptor (
1502 PSECURITY_DESCRIPTOR SecurityDescriptor
1513 RtlLookupAtomInAtomTable (
1514 IN PRTL_ATOM_TABLE AtomTable
,
1521 RtlMultiByteToUnicodeN (
1522 PWCHAR UnicodeString
,
1531 RtlMultiByteToUnicodeSize (
1539 RtlNtStatusToDosError (
1545 RtlNtStatusToDosErrorNoTeb (
1551 RtlNtStatusToPsxErrno (
1557 RtlNumberGenericTableElements (
1558 IN PRTL_GENERIC_TABLE Table
1563 RtlNumberOfClearBits (
1564 PRTL_BITMAP BitMapHeader
1569 RtlNumberOfSetBits (
1570 PRTL_BITMAP BitMapHeader
1575 RtlOemStringToUnicodeSize (
1576 POEM_STRING AnsiString
1581 RtlOemStringToUnicodeString (
1582 PUNICODE_STRING DestinationString
,
1583 POEM_STRING SourceString
,
1584 BOOLEAN AllocateDestinationString
1590 PWCHAR UnicodeString
,
1598 RtlPinAtomInAtomTable (
1599 IN PRTL_ATOM_TABLE AtomTable
,
1606 PANSI_STRING String1
,
1607 PANSI_STRING String2
,
1608 BOOLEAN CaseInsensitive
1613 RtlPrefixUnicodeString (
1614 PUNICODE_STRING String1
,
1615 PUNICODE_STRING String2
,
1616 BOOLEAN CaseInsensitive
1621 RtlQueryAtomInAtomTable (
1622 IN PRTL_ATOM_TABLE AtomTable
,
1624 IN OUT PULONG RefCount OPTIONAL
,
1625 IN OUT PULONG PinCount OPTIONAL
,
1626 IN OUT PWSTR AtomName OPTIONAL
,
1627 IN OUT PULONG NameLength OPTIONAL
1632 RtlQueryTimeZoneInformation (
1633 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1639 IN PEXCEPTION_RECORD ExceptionRecord
1654 IN USHORT CompressionFormat
,
1655 IN OUT PUCHAR
*CompressedBuffer
,
1656 IN PUCHAR EndOfCompressedBufferPlus1
,
1657 OUT PUCHAR
*ChunkBuffer
,
1663 RtlResetRtlTranslations (
1664 IN PNLSTABLEINFO NlsTable
1669 * RtlRetrieveUlong (
1670 * PULONG DestinationAddress,
1671 * PULONG SourceAddress
1674 #define RtlRetrieveUlong(DestAddress,SrcAddress) \
1675 if ((ULONG)(SrcAddress) & LONG_MASK) \
1677 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1678 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1679 ((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
1680 ((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
1684 *((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
1689 * RtlRetrieveUshort (
1690 * PUSHORT DestinationAddress,
1691 * PUSHORT SourceAddress
1694 #define RtlRetrieveUshort(DestAddress,SrcAddress) \
1695 if ((ULONG)(SrcAddress) & SHORT_MASK) \
1697 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1698 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1702 *((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
1707 RtlSecondsSince1970ToTime (
1708 ULONG SecondsSince1970
,
1714 RtlSecondsSince1980ToTime (
1715 ULONG SecondsSince1980
,
1722 IN PRTL_BITMAP BitMapHeader
1728 PRTL_BITMAP BitMapHeader
,
1729 ULONG StartingIndex
,
1735 RtlSetDaclSecurityDescriptor (
1736 PSECURITY_DESCRIPTOR SecurityDescriptor
,
1737 BOOLEAN DaclPresent
,
1739 BOOLEAN DaclDefaulted
1744 RtlSetTimeZoneInformation (
1745 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1763 #define RtlStoreUlong(Address,Value) \
1764 if ((ULONG)(Address) & LONG_MASK) \
1766 ((PUCHAR)(Address))[LONG_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1767 ((PUCHAR)(Address))[LONG_3RD_MOST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1768 ((PUCHAR)(Address))[LONG_2ND_MOST_SIGNIFICANT_BIT]=(UCHAR)(THIRDBYTE(Value)); \
1769 ((PUCHAR)(Address))[LONG_MOST_SIGNIFICANT_BIT]=(UCHAR)(FOURTHBYTE(Value)); \
1773 *((PULONG)(Address))=(ULONG)(Value); \
1783 #define RtlStoreUshort(Address,Value) \
1784 if ((ULONG)(Address) & SHORT_MASK) \
1786 ((PUCHAR)(Address))[SHORT_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1787 ((PUCHAR)(Address))[SHORT_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
1791 *((PUSHORT)(Address))=(USHORT)(Value); \
1796 RtlTimeFieldsToTime (
1797 PTIME_FIELDS TimeFields
,
1803 RtlTimeToSecondsSince1970 (
1804 PLARGE_INTEGER Time
,
1805 PULONG SecondsSince1970
1810 RtlTimeToSecondsSince1980 (
1811 PLARGE_INTEGER Time
,
1812 PULONG SecondsSince1980
1817 RtlTimeToTimeFields (
1818 PLARGE_INTEGER Time
,
1819 PTIME_FIELDS TimeFields
1824 RtlUnicodeStringToAnsiSize (
1825 IN PUNICODE_STRING UnicodeString
1830 RtlUnicodeStringToAnsiString (
1831 IN OUT PANSI_STRING DestinationString
,
1832 IN PUNICODE_STRING SourceString
,
1833 IN BOOLEAN AllocateDestinationString
1838 RtlUnicodeStringToInteger (
1839 IN PUNICODE_STRING String
,
1846 RtlUnicodeStringToOemSize (
1847 IN PUNICODE_STRING UnicodeString
1852 RtlUnicodeStringToCountedOemString (
1853 IN OUT POEM_STRING DestinationString
,
1854 IN PUNICODE_STRING SourceString
,
1855 IN BOOLEAN AllocateDestinationString
1860 RtlUnicodeStringToOemString (
1861 IN OUT POEM_STRING DestinationString
,
1862 IN PUNICODE_STRING SourceString
,
1863 IN BOOLEAN AllocateDestinationString
1868 RtlUnicodeToCustomCPN (
1869 IN PCPTABLEINFO CustomCP
,
1873 PWCHAR UnicodeString
,
1879 RtlUnicodeToMultiByteN (
1883 PWCHAR UnicodeString
,
1889 RtlUnicodeToMultiByteSize (
1891 PWCHAR UnicodeString
,
1901 PWCHAR UnicodeString
,
1914 PEXCEPTION_REGISTRATION RegistrationFrame
,
1915 PVOID ReturnAddress
,
1916 PEXCEPTION_RECORD ExceptionRecord
,
1922 RtlUpcaseUnicodeChar (
1928 RtlUpcaseUnicodeString (
1929 IN OUT PUNICODE_STRING DestinationString
,
1930 IN PUNICODE_STRING SourceString
,
1931 IN BOOLEAN AllocateDestinationString
1936 RtlUpcaseUnicodeStringToAnsiString (
1937 IN OUT PANSI_STRING DestinationString
,
1938 IN PUNICODE_STRING SourceString
,
1939 IN BOOLEAN AllocateDestinationString
1944 RtlUpcaseUnicodeStringToCountedOemString (
1945 IN OUT POEM_STRING DestinationString
,
1946 IN PUNICODE_STRING SourceString
,
1947 IN BOOLEAN AllocateDestinationString
1952 RtlUpcaseUnicodeStringToOemString (
1953 IN OUT POEM_STRING DestinationString
,
1954 IN PUNICODE_STRING SourceString
,
1955 IN BOOLEAN AllocateDestinationString
1960 RtlUpcaseUnicodeToCustomCPN (
1961 IN PCPTABLEINFO CustomCP
,
1965 PWCHAR UnicodeString
,
1971 RtlUpcaseUnicodeToMultiByteN (
1975 PWCHAR UnicodeString
,
1981 RtlUpcaseUnicodeToOemN (
1985 PWCHAR UnicodeString
,
1998 PSTRING DestinationString
,
1999 PSTRING SourceString
2012 RtlValidSecurityDescriptor (
2013 PSECURITY_DESCRIPTOR SecurityDescriptor
2017 RtlValidSid(IN PSID Sid
);
2021 RtlxAnsiStringToUnicodeSize (
2022 IN PANSI_STRING AnsiString
2027 RtlxOemStringToUnicodeSize (
2028 IN POEM_STRING OemString
2033 RtlxUnicodeStringToAnsiSize (
2034 IN PUNICODE_STRING UnicodeString
2039 RtlxUnicodeStringToOemSize (
2040 IN PUNICODE_STRING UnicodeString
2044 /* Register io functions */
2048 READ_REGISTER_UCHAR (
2054 READ_REGISTER_USHORT (
2060 READ_REGISTER_ULONG (
2066 READ_REGISTER_BUFFER_UCHAR (
2074 READ_REGISTER_BUFFER_USHORT (
2082 READ_REGISTER_BUFFER_ULONG (
2090 WRITE_REGISTER_UCHAR (
2097 WRITE_REGISTER_USHORT (
2104 WRITE_REGISTER_ULONG (
2111 WRITE_REGISTER_BUFFER_UCHAR (
2119 WRITE_REGISTER_BUFFER_USHORT (
2127 WRITE_REGISTER_BUFFER_ULONG (
2134 NTSTATUS STDCALL
RtlCreateAcl(PACL Acl
, ULONG AclSize
, ULONG AclRevision
);
2135 NTSTATUS STDCALL
RtlQueryInformationAcl (PACL Acl
, PVOID Information
, ULONG InformationLength
, ACL_INFORMATION_CLASS InformationClass
);
2136 NTSTATUS STDCALL
RtlSetInformationAcl (PACL Acl
, PVOID Information
, ULONG InformationLength
, ACL_INFORMATION_CLASS InformationClass
);
2137 BOOLEAN STDCALL
RtlValidAcl (PACL Acl
);
2139 NTSTATUS STDCALL
RtlAddAccessAllowedAce(PACL Acl
, ULONG Revision
, ACCESS_MASK AccessMask
, PSID Sid
);
2140 NTSTATUS STDCALL
RtlAddAccessDeniedAce(PACL Acl
, ULONG Revision
, ACCESS_MASK AccessMask
, PSID Sid
);
2141 NTSTATUS STDCALL
RtlAddAce(PACL Acl
, ULONG Revision
, ULONG StartingIndex
, PACE AceList
, ULONG AceListLength
);
2142 NTSTATUS STDCALL
RtlAddAuditAccessAce (PACL Acl
, ULONG Revision
, ACCESS_MASK AccessMask
, PSID Sid
, BOOLEAN Success
, BOOLEAN Failure
);
2143 NTSTATUS STDCALL
RtlDeleteAce(PACL Acl
, ULONG AceIndex
);
2144 BOOLEAN STDCALL
RtlFirstFreeAce(PACL Acl
, PACE
* Ace
);
2145 NTSTATUS STDCALL
RtlGetAce(PACL Acl
, ULONG AceIndex
, PACE
*Ace
);
2147 NTSTATUS STDCALL
RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD
, PSECURITY_DESCRIPTOR RelSD
, PULONG BufferLength
);
2148 NTSTATUS STDCALL
RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD
, PSECURITY_DESCRIPTOR RelSD
, PULONG BufferLength
);
2149 NTSTATUS STDCALL
RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, ULONG Revision
);
2150 BOOLEAN STDCALL
RtlValidSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
);
2151 ULONG STDCALL
RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
);
2152 NTSTATUS STDCALL
RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, BOOLEAN DaclPresent
, PACL Dacl
, BOOLEAN DaclDefaulted
);
2153 NTSTATUS STDCALL
RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PBOOLEAN DaclPresent
, PACL
* Dacl
, PBOOLEAN DaclDefauted
);
2154 NTSTATUS STDCALL
RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PSID Owner
, BOOLEAN OwnerDefaulted
);
2155 NTSTATUS STDCALL
RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PSID
* Owner
, PBOOLEAN OwnerDefaulted
);
2156 NTSTATUS STDCALL
RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PSID Group
, BOOLEAN GroupDefaulted
);
2157 NTSTATUS STDCALL
RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PSID
* Group
, PBOOLEAN GroupDefaulted
);
2158 NTSTATUS STDCALL
RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PSECURITY_DESCRIPTOR_CONTROL Control
, PULONG Revision
);
2159 NTSTATUS STDCALL
RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, BOOLEAN SaclPresent
, PACL Sacl
, BOOLEAN SaclDefaulted
);
2160 NTSTATUS STDCALL
RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PBOOLEAN SaclPresent
, PACL
* Sacl
, PBOOLEAN SaclDefauted
);
2161 NTSTATUS STDCALL
RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD
,
2162 PSECURITY_DESCRIPTOR AbsSD
,
2173 NTSTATUS STDCALL
RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
,
2174 UCHAR SubAuthorityCount
,
2175 ULONG SubAuthority0
,
2176 ULONG SubAuthority1
,
2177 ULONG SubAuthority2
,
2178 ULONG SubAuthority3
,
2179 ULONG SubAuthority4
,
2180 ULONG SubAuthority5
,
2181 ULONG SubAuthority6
,
2182 ULONG SubAuthority7
,
2184 ULONG STDCALL
RtlLengthRequiredSid (UCHAR SubAuthorityCount
);
2185 PSID_IDENTIFIER_AUTHORITY STDCALL
RtlIdentifierAuthoritySid (PSID Sid
);
2186 NTSTATUS STDCALL
RtlInitializeSid (PSID Sid
, PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
, UCHAR SubAuthorityCount
);
2187 PULONG STDCALL
RtlSubAuthoritySid (PSID Sid
, ULONG SubAuthority
);
2188 BOOLEAN STDCALL
RtlEqualPrefixSid (PSID Sid1
, PSID Sid2
);
2189 BOOLEAN STDCALL
RtlEqualSid(PSID Sid1
, PSID Sid2
);
2190 PSID STDCALL
RtlFreeSid (PSID Sid
);
2191 ULONG STDCALL
RtlLengthSid (PSID Sid
);
2192 PULONG STDCALL
RtlSubAuthoritySid (PSID Sid
, ULONG SubAuthority
);
2193 PUCHAR STDCALL
RtlSubAuthorityCountSid (PSID Sid
);
2194 BOOLEAN STDCALL
RtlValidSid (PSID Sid
);
2195 NTSTATUS STDCALL
RtlConvertSidToUnicodeString (PUNICODE_STRING String
, PSID Sid
, BOOLEAN AllocateBuffer
);
2197 BOOLEAN STDCALL
RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess
, ACCESS_MASK DesiredAccess
);
2198 BOOLEAN STDCALL
RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess
, ACCESS_MASK DesiredAccess
);
2199 VOID STDCALL
RtlMapGenericMask (PACCESS_MASK AccessMask
, PGENERIC_MAPPING GenericMapping
);
2202 /* functions exported from NTOSKRNL.EXE which are considered RTL */
2204 #if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
2206 char *_itoa (int value
, char *string
, int radix
);
2207 int _snprintf(char * buf
, size_t cnt
, const char *fmt
, ...);
2208 int _snwprintf(wchar_t *buf
, size_t cnt
, const wchar_t *fmt
, ...);
2209 int _stricmp(const char *s1
, const char *s2
);
2210 char * _strlwr(char *x
);
2211 int _strnicmp(const char *s1
, const char *s2
, size_t n
);
2212 char * _strnset(char* szToFill
, int szFill
, size_t sizeMaxFill
);
2213 char * _strrev(char *s
);
2214 char * _strset(char* szToFill
, int szFill
);
2215 char * _strupr(char *x
);
2216 int _vsnprintf(char *buf
, size_t cnt
, const char *fmt
, va_list args
);
2217 int _wcsicmp (const wchar_t* cs
, const wchar_t* ct
);
2218 wchar_t * _wcslwr (wchar_t *x
);
2219 int _wcsnicmp (const wchar_t * cs
,const wchar_t * ct
,size_t count
);
2220 wchar_t* _wcsnset (wchar_t* wsToFill
, wchar_t wcFill
, size_t sizeMaxFill
);
2221 wchar_t * _wcsrev(wchar_t *s
);
2222 wchar_t *_wcsupr(wchar_t *x
);
2224 int atoi(const char *str
);
2225 long atol(const char *str
);
2231 int isxdigit(int c
);
2232 size_t mbstowcs (wchar_t *wcstr
, const char *mbstr
, size_t count
);
2233 int mbtowc (wchar_t *wchar
, const char *mbchar
, size_t count
);
2234 void * memchr(const void *s
, int c
, size_t n
);
2235 void * memcpy(void *to
, const void *from
, size_t count
);
2236 void * memmove(void *dest
,const void *src
, size_t count
);
2237 void * memset(void *src
, int val
, size_t count
);
2244 int sprintf(char * buf
, const char *fmt
, ...);
2245 void srand(unsigned seed
);
2246 char * strcat(char *s
, const char *append
);
2247 char * strchr(const char *s
, int c
);
2248 int strcmp(const char *s1
, const char *s2
);
2249 char * strcpy(char *to
, const char *from
);
2250 size_t strlen(const char *str
);
2251 char * strncat(char *dst
, const char *src
, size_t n
);
2252 int strncmp(const char *s1
, const char *s2
, size_t n
);
2253 char *strncpy(char *dst
, const char *src
, size_t n
);
2254 char *strrchr(const char *s
, int c
);
2255 size_t strspn(const char *s1
, const char *s2
);
2256 char *strstr(const char *s
, const char *find
);
2257 int swprintf(wchar_t *buf
, const wchar_t *fmt
, ...);
2260 wchar_t towlower(wchar_t c
);
2261 wchar_t towupper(wchar_t c
);
2262 int vsprintf(char *buf
, const char *fmt
, va_list args
);
2263 wchar_t * wcscat(wchar_t *dest
, const wchar_t *src
);
2264 wchar_t * wcschr(const wchar_t *str
, wchar_t ch
);
2265 int wcscmp(const wchar_t *cs
, const wchar_t *ct
);
2266 wchar_t* wcscpy(wchar_t* str1
, const wchar_t* str2
);
2267 size_t wcscspn(const wchar_t *str
,const wchar_t *reject
);
2268 size_t wcslen(const wchar_t *s
);
2269 wchar_t * wcsncat(wchar_t *dest
, const wchar_t *src
, size_t count
);
2270 int wcsncmp(const wchar_t *cs
, const wchar_t *ct
, size_t count
);
2271 wchar_t * wcsncpy(wchar_t *dest
, const wchar_t *src
, size_t count
);
2272 wchar_t * wcsrchr(const wchar_t *str
, wchar_t ch
);
2273 size_t wcsspn(const wchar_t *str
,const wchar_t *accept
);
2274 wchar_t *wcsstr(const wchar_t *s
,const wchar_t *b
);
2275 size_t wcstombs (char *mbstr
, const wchar_t *wcstr
, size_t count
);
2276 int wctomb (char *mbchar
, wchar_t wchar
);
2278 #endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
2280 #endif /* __DDK_RTL_H */