1 /* $Id: rtl.h,v 1.18 2003/09/02 11:14:15 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
,
417 IN PCWSTR ValueName
);
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
482 #define NLS_ANSI_CODE_PAGE NlsAnsiCodePage
483 #define NLS_LEAD_BYTE_INFO NlsLeadByteInfo
484 #define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
485 #define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
486 #define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
488 #if defined(__NTOSKRNL__) || defined(__NTDLL__)
489 extern USHORT EXPORTED NlsAnsiCodePage
;
490 extern PUSHORT EXPORTED NlsLeadByteInfo
;
491 extern BOOLEAN EXPORTED NlsMbCodePageTag
;
492 extern BOOLEAN EXPORTED NlsMbOemCodePageTag
;
493 extern PUSHORT EXPORTED NlsOemLeadByteInfo
;
495 extern USHORT IMPORTED NlsAnsiCodePage
;
496 extern PUSHORT IMPORTED NlsLeadByteInfo
;
497 extern BOOLEAN IMPORTED NlsMbCodePageTag
;
498 extern BOOLEAN IMPORTED NlsMbOemCodePageTag
;
499 extern PUSHORT IMPORTED NlsOemLeadByteInfo
;
500 #endif /* __NTOSKRNL__ || __NTDLL__ */
504 * NOTE: ReactOS extensions
506 #define RtlMin(X,Y) (((X) < (Y))? (X) : (Y))
507 #define RtlMax(X,Y) (((X) > (Y))? (X) : (Y))
508 #define RtlMin3(X,Y,Z) (((X) < (Y)) ? RtlMin(X,Z) : RtlMin(Y,Z))
509 #define RtlMax3(X,Y,Z) (((X) > (Y)) ? RtlMax(X,Z) : RtlMax(Y,Z))
514 * InitializeUnicodeString(PUNICODE_STRING DestinationString,
516 * USHORT MaximumLength,
519 * Initialize n UNICODE_STRING from its fields. Use when you know the values of
520 * all the fields in advance
523 #define InitializeUnicodeString(__PDEST_STRING__,__LENGTH__,__MAXLENGTH__,__BUFFER__) \
525 (__PDEST_STRING__)->Length = (__LENGTH__); \
526 (__PDEST_STRING__)->MaximumLength = (__MAXLENGTH__); \
527 (__PDEST_STRING__)->Buffer = (__BUFFER__); \
533 * RtlInitUnicodeStringFromLiteral(PUNICODE_STRING DestinationString,
534 * PCWSTR SourceString);
536 * Initialize a UNICODE_STRING from a wide string literal. WARNING: use only with
537 * string literals and statically initialized arrays, it will calculate the wrong
541 #define RtlInitUnicodeStringFromLiteral(__PDEST_STRING__,__SOURCE_STRING__) \
542 InitializeUnicodeString( \
543 (__PDEST_STRING__), \
544 sizeof(__SOURCE_STRING__) - sizeof(WCHAR), \
545 sizeof(__SOURCE_STRING__), \
546 (__SOURCE_STRING__) \
551 * Static initializer for UNICODE_STRING variables.
554 * UNICODE_STRING wstr = UNICODE_STRING_INITIALIZER(L"string");
557 #define UNICODE_STRING_INITIALIZER(__SOURCE_STRING__) \
559 sizeof((__SOURCE_STRING__)) - sizeof(WCHAR), \
560 sizeof((__SOURCE_STRING__)), \
561 (__SOURCE_STRING__) \
566 * Initializer for empty UNICODE_STRING variables.
569 * UNICODE_STRING wstr = EMPTY_UNICODE_STRING;
572 #define EMPTY_UNICODE_STRING {0, 0, NULL}
578 PSINGLE_LIST_ENTRY ListHead,
579 PSINGLE_LIST_ENTRY Entry
583 #define PushEntryList(ListHead,Entry) \
584 (Entry)->Next = (ListHead)->Next; \
585 (ListHead)->Next = (Entry)
591 RtlAddAtomToAtomTable (
592 IN PRTL_ATOM_TABLE AtomTable
,
606 RtlAnsiCharToUnicodeChar (
612 RtlAnsiStringToUnicodeSize (
613 PANSI_STRING AnsiString
618 RtlAnsiStringToUnicodeString (
619 PUNICODE_STRING DestinationString
,
620 PANSI_STRING SourceString
,
621 BOOLEAN AllocateDestinationString
626 RtlAppendAsciizToString(
633 RtlAppendStringToString (
640 RtlAppendUnicodeStringToString (
641 PUNICODE_STRING Destination
,
642 PUNICODE_STRING Source
648 PRTL_BITMAP BitMapHeader
,
656 PRTL_BITMAP BitMapHeader
,
664 PVOID FailedAssertion
,
680 RtlCheckRegistryKey (
688 IN PRTL_BITMAP BitMapHeader
694 IN PRTL_BITMAP BitMapHeader
,
695 IN ULONG StartingIndex
,
696 IN ULONG NumberToClear
711 BOOLEAN CaseInsensitive
716 RtlCompareUnicodeString (
717 PUNICODE_STRING String1
,
718 PUNICODE_STRING String2
,
719 BOOLEAN CaseInsensitive
723 RtlCompressBuffer(IN USHORT CompressionFormatAndEngine
,
724 IN PUCHAR UncompressedBuffer
,
725 IN ULONG UncompressedBufferSize
,
726 OUT PUCHAR CompressedBuffer
,
727 IN ULONG CompressedBufferSize
,
728 IN ULONG UncompressedChunkSize
,
729 OUT PULONG FinalCompressedSize
,
733 RtlCompressChunks(IN PUCHAR UncompressedBuffer
,
734 IN ULONG UncompressedBufferSize
,
735 OUT PUCHAR CompressedBuffer
,
736 IN ULONG CompressedBufferSize
,
737 IN OUT PCOMPRESSED_DATA_INFO CompressedDataInfo
,
738 IN ULONG CompressedDataInfoLength
,
741 LARGE_INTEGER STDCALL
742 RtlConvertLongToLargeInteger(IN LONG SignedInteger
);
745 RtlConvertSidToUnicodeString(IN OUT PUNICODE_STRING String
,
747 IN BOOLEAN AllocateString
);
749 LARGE_INTEGER STDCALL
750 RtlConvertUlongToLargeInteger(IN ULONG UnsignedInteger
);
768 #define RtlCopyBytes RtlCopyMemory
771 RtlCopyLuid(IN PLUID LuidDest
,
775 RtlCopyLuidAndAttributesArray(ULONG Count
,
776 PLUID_AND_ATTRIBUTES Src
,
777 PLUID_AND_ATTRIBUTES Dest
);
780 RtlCopySid(ULONG BufferLength
,
785 RtlCopySidAndAttributesArray(ULONG Count
,
786 PSID_AND_ATTRIBUTES Src
,
788 PSID_AND_ATTRIBUTES Dest
,
790 PVOID
* RemainingSidArea
,
791 PULONG RemainingSidAreaSize
);
794 RtlCopyString(PSTRING DestinationString
,
795 PSTRING SourceString
);
798 RtlCopyUnicodeString(PUNICODE_STRING DestinationString
,
799 PUNICODE_STRING SourceString
);
802 RtlCreateAtomTable(IN ULONG TableSize
,
803 IN OUT PRTL_ATOM_TABLE
*AtomTable
);
810 ULONG SizeToReserve
, /* dwMaximumSize */
811 ULONG SizeToCommit
, /* dwInitialSize */
813 PRTL_HEAP_DEFINITION Definition
818 RtlCreateRegistryKey (
825 RtlCreateSecurityDescriptor (
826 PSECURITY_DESCRIPTOR SecurityDescriptor
,
832 RtlCreateUnicodeString (
833 OUT PUNICODE_STRING Destination
,
838 RtlCreateUnicodeStringFromAsciiz (OUT PUNICODE_STRING Destination
,
843 RtlCustomCPToUnicodeN (
844 IN PCPTABLEINFO CustomCP
,
845 PWCHAR UnicodeString
,
853 RtlDecompressBuffer(IN USHORT CompressionFormat
,
854 OUT PUCHAR UncompressedBuffer
,
855 IN ULONG UncompressedBufferSize
,
856 IN PUCHAR CompressedBuffer
,
857 IN ULONG CompressedBufferSize
,
858 OUT PULONG FinalUncompressedSize
);
861 RtlDecompressChunks(OUT PUCHAR UncompressedBuffer
,
862 IN ULONG UncompressedBufferSize
,
863 IN PUCHAR CompressedBuffer
,
864 IN ULONG CompressedBufferSize
,
865 IN PUCHAR CompressedTail
,
866 IN ULONG CompressedTailSize
,
867 IN PCOMPRESSED_DATA_INFO CompressedDataInfo
);
870 RtlDecompressFragment(IN USHORT CompressionFormat
,
871 OUT PUCHAR UncompressedFragment
,
872 IN ULONG UncompressedFragmentSize
,
873 IN PUCHAR CompressedBuffer
,
874 IN ULONG CompressedBufferSize
,
875 IN ULONG FragmentOffset
,
876 OUT PULONG FinalUncompressedSize
,
880 RtlDeleteAtomFromAtomTable(IN PRTL_ATOM_TABLE AtomTable
,
884 RtlDescribeChunk(IN USHORT CompressionFormat
,
885 IN OUT PUCHAR
*CompressedBuffer
,
886 IN PUCHAR EndOfCompressedBufferPlus1
,
887 OUT PUCHAR
*ChunkBuffer
,
888 OUT PULONG ChunkSize
);
891 RtlDestroyAtomTable(IN PRTL_ATOM_TABLE AtomTable
);
894 RtlDestroyHeap(HANDLE hheap
);
898 RtlDowncaseUnicodeString (
899 IN OUT PUNICODE_STRING DestinationString
,
900 IN PUNICODE_STRING SourceString
,
901 IN BOOLEAN AllocateDestinationString
907 IN PRTL_ATOM_TABLE AtomTable
,
908 IN BOOLEAN DeletePinned
913 RtlEnlargedIntegerMultiply (
920 RtlEnlargedUnsignedDivide (
921 ULARGE_INTEGER Dividend
,
928 RtlEnlargedUnsignedMultiply (
938 BOOLEAN CaseInSensitive
943 RtlExtendedIntegerMultiply (
944 LARGE_INTEGER Multiplicand
,
950 RtlExtendedLargeIntegerDivide (
951 LARGE_INTEGER Dividend
,
958 RtlExtendedMagicDivide (
959 LARGE_INTEGER Dividend
,
960 LARGE_INTEGER MagicDivisor
,
975 PRTL_BITMAP BitMapHeader
,
982 RtlFindClearBitsAndSet (
983 PRTL_BITMAP BitMapHeader
,
990 RtlFindFirstRunClear (
991 PRTL_BITMAP BitMapHeader
,
998 PRTL_BITMAP BitMapHeader
,
1004 RtlFindLongestRunClear (
1005 PRTL_BITMAP BitMapHeader
,
1006 PULONG StartingIndex
1011 RtlFindLongestRunSet (
1012 PRTL_BITMAP BitMapHeader
,
1013 PULONG StartingIndex
1019 IN PVOID BaseAddress
,
1023 OUT PRTL_MESSAGE_RESOURCE_ENTRY
*MessageResourceEntry
1029 PRTL_BITMAP BitMapHeader
,
1036 RtlFindSetBitsAndClear (
1037 PRTL_BITMAP BitMapHeader
,
1044 RtlFormatCurrentUserKeyPath (
1045 IN OUT PUNICODE_STRING KeyPath
1051 PANSI_STRING AnsiString
1065 POEM_STRING OemString
1070 RtlFreeUnicodeString (
1071 PUNICODE_STRING UnicodeString
1075 RtlGenerate8dot3Name(IN PUNICODE_STRING Name
,
1076 IN BOOLEAN AllowExtendedCharacters
,
1077 IN OUT PGENERATE_NAME_CONTEXT Context
,
1078 OUT PUNICODE_STRING Name8dot3
);
1081 RtlGetCompressionWorkSpaceSize(IN USHORT CompressionFormatAndEngine
,
1082 OUT PULONG CompressBufferAndWorkSpaceSize
,
1083 OUT PULONG CompressFragmentWorkSpaceSize
);
1087 RtlGetDefaultCodePage (
1088 PUSHORT AnsiCodePage
,
1094 RtlImageDirectoryEntryToData (
1104 IN PVOID BaseAddress
1107 PIMAGE_SECTION_HEADER
1109 RtlImageRvaToSection (
1110 PIMAGE_NT_HEADERS NtHeader
,
1118 PIMAGE_NT_HEADERS NtHeader
,
1121 PIMAGE_SECTION_HEADER
*SectionHeader
1127 PANSI_STRING DestinationString
,
1133 RtlInitCodePageTable (
1134 IN PUSHORT TableBase
,
1135 OUT PCPTABLEINFO CodePageTable
1141 IN PUSHORT AnsiTableBase
,
1142 IN PUSHORT OemTableBase
,
1143 IN PUSHORT CaseTableBase
,
1144 OUT PNLSTABLEINFO NlsTable
1150 PSTRING DestinationString
,
1156 RtlInitUnicodeString (
1157 PUNICODE_STRING DestinationString
,
1163 RtlInitializeBitMap (
1164 IN OUT PRTL_BITMAP BitMapHeader
,
1165 IN PULONG BitMapBuffer
,
1166 IN ULONG SizeOfBitMap
1171 RtlInitializeContext (
1172 IN HANDLE ProcessHandle
,
1173 IN PCONTEXT Context
,
1175 IN PTHREAD_START_ROUTINE StartAddress
,
1176 IN OUT PUSER_STACK UserStack
1181 RtlInitializeGenericTable (
1182 IN OUT PRTL_GENERIC_TABLE Table
,
1183 IN PVOID CompareRoutine
,
1184 IN PVOID AllocateRoutine
,
1185 IN PVOID FreeRoutine
,
1186 IN ULONG UserParameter
1191 RtlInsertElementGenericTable (
1192 IN OUT PRTL_GENERIC_TABLE Table
,
1194 IN ULONG ElementSize
,
1209 RtlIntegerToUnicodeString (
1212 IN OUT PUNICODE_STRING String
1217 RtlIsGenericTableEmpty (
1218 IN PRTL_GENERIC_TABLE Table
1223 RtlIsNameLegalDOS8Dot3 (
1224 IN PUNICODE_STRING UnicodeName
,
1225 IN PANSI_STRING AnsiName
,
1226 OUT PBOOLEAN SpacesFound
1239 RtlLargeIntegerAdd (
1240 LARGE_INTEGER Addend1
,
1241 LARGE_INTEGER Addend2
1246 * RtlLargeIntegerAnd (
1247 * PLARGE_INTEGER Result,
1248 * LARGE_INTEGER Source,
1249 * LARGE_INTEGER Mask
1252 #define RtlLargeIntegerAnd(Result, Source, Mask) \
1254 Result.HighPart = Source.HighPart & Mask.HighPart; \
1255 Result.LowPart = Source.LowPart & Mask.LowPart; \
1260 RtlLargeIntegerArithmeticShift (
1261 LARGE_INTEGER LargeInteger
,
1267 RtlLargeIntegerDivide (
1268 LARGE_INTEGER Dividend
,
1269 LARGE_INTEGER Divisor
,
1270 PLARGE_INTEGER Remainder
1275 * RtlLargeIntegerEqualTo (
1276 * LARGE_INTEGER Operand1,
1277 * LARGE_INTEGER Operand2
1280 #define RtlLargeIntegerEqualTo(X,Y) \
1281 (!(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1285 * RtlLargeIntegerEqualToZero (
1286 * LARGE_INTEGER Operand
1289 #define RtlLargeIntegerEqualToZero(X) \
1290 (!((X).LowPart | (X).HighPart))
1294 * RtlLargeIntegerGreaterThan (
1295 * LARGE_INTEGER Operand1,
1296 * LARGE_INTEGER Operand2
1299 #define RtlLargeIntegerGreaterThan(X,Y) \
1300 ((((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \
1301 ((X).HighPart > (Y).HighPart))
1305 * RtlLargeIntegerGreaterThanOrEqualTo (
1306 * LARGE_INTEGER Operand1,
1307 * LARGE_INTEGER Operand2
1310 #define RtlLargeIntegerGreaterThanOrEqualTo(X,Y) \
1311 ((((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \
1312 ((X).HighPart > (Y).HighPart))
1316 * RtlLargeIntegerGreaterThanOrEqualToZero (
1317 * LARGE_INTEGER Operand1
1320 #define RtlLargeIntegerGreaterOrEqualToZero(X) \
1325 * RtlLargeIntegerGreaterThanZero (
1326 * LARGE_INTEGER Operand1
1329 #define RtlLargeIntegerGreaterThanZero(X) \
1330 ((((X).HighPart == 0) && ((X).LowPart > 0)) || \
1331 ((X).HighPart > 0 ))
1335 * RtlLargeIntegerLessThan (
1336 * LARGE_INTEGER Operand1,
1337 * LARGE_INTEGER Operand2
1340 #define RtlLargeIntegerLessThan(X,Y) \
1341 ((((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \
1342 ((X).HighPart < (Y).HighPart))
1346 * RtlLargeIntegerLessThanOrEqualTo (
1347 * LARGE_INTEGER Operand1,
1348 * LARGE_INTEGER Operand2
1351 #define RtlLargeIntegerLessThanOrEqualTo(X,Y) \
1352 ((((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \
1353 ((X).HighPart < (Y).HighPart))
1357 * RtlLargeIntegerLessThanOrEqualToZero (
1358 * LARGE_INTEGER Operand
1361 #define RtlLargeIntegerLessOrEqualToZero(X) \
1362 (((X).HighPart < 0) || !((X).LowPart | (X).HighPart))
1366 * RtlLargeIntegerLessThanZero (
1367 * LARGE_INTEGER Operand
1370 #define RtlLargeIntegerLessThanZero(X) \
1371 (((X).HighPart < 0))
1375 RtlLargeIntegerNegate (
1376 LARGE_INTEGER Subtrahend
1381 * RtlLargeIntegerNotEqualTo (
1382 * LARGE_INTEGER Operand1,
1383 * LARGE_INTEGER Operand2
1386 #define RtlLargeIntegerNotEqualTo(X,Y) \
1387 ((((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)))
1391 * RtlLargeIntegerNotEqualToZero (
1392 * LARGE_INTEGER Operand
1395 #define RtlLargeIntegerNotEqualToZero(X) \
1396 (((X).LowPart | (X).HighPart))
1400 RtlLargeIntegerShiftLeft (
1401 LARGE_INTEGER LargeInteger
,
1407 RtlLargeIntegerShiftRight (
1408 LARGE_INTEGER LargeInteger
,
1414 RtlLargeIntegerSubtract (
1415 LARGE_INTEGER Minuend
,
1416 LARGE_INTEGER Subtrahend
1421 RtlLengthSecurityDescriptor (
1422 PSECURITY_DESCRIPTOR SecurityDescriptor
1433 RtlLookupAtomInAtomTable (
1434 IN PRTL_ATOM_TABLE AtomTable
,
1441 RtlMultiByteToUnicodeN (
1442 PWCHAR UnicodeString
,
1445 const PCHAR MbString
,
1451 RtlMultiByteToUnicodeSize (
1459 RtlNtStatusToDosError (
1465 RtlNtStatusToDosErrorNoTeb (
1471 RtlNtStatusToPsxErrno (
1477 RtlNumberGenericTableElements (
1478 IN PRTL_GENERIC_TABLE Table
1483 RtlNumberOfClearBits (
1484 PRTL_BITMAP BitMapHeader
1489 RtlNumberOfSetBits (
1490 PRTL_BITMAP BitMapHeader
1495 RtlOemStringToUnicodeSize (
1496 POEM_STRING AnsiString
1501 RtlOemStringToUnicodeString (
1502 PUNICODE_STRING DestinationString
,
1503 POEM_STRING SourceString
,
1504 BOOLEAN AllocateDestinationString
1510 PWCHAR UnicodeString
,
1518 RtlPinAtomInAtomTable (
1519 IN PRTL_ATOM_TABLE AtomTable
,
1526 PANSI_STRING String1
,
1527 PANSI_STRING String2
,
1528 BOOLEAN CaseInsensitive
1533 RtlPrefixUnicodeString (
1534 PUNICODE_STRING String1
,
1535 PUNICODE_STRING String2
,
1536 BOOLEAN CaseInsensitive
1541 RtlQueryAtomInAtomTable (
1542 IN PRTL_ATOM_TABLE AtomTable
,
1544 IN OUT PULONG RefCount OPTIONAL
,
1545 IN OUT PULONG PinCount OPTIONAL
,
1546 IN OUT PWSTR AtomName OPTIONAL
,
1547 IN OUT PULONG NameLength OPTIONAL
1552 RtlQueryTimeZoneInformation (
1553 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1559 IN PEXCEPTION_RECORD ExceptionRecord
1574 IN USHORT CompressionFormat
,
1575 IN OUT PUCHAR
*CompressedBuffer
,
1576 IN PUCHAR EndOfCompressedBufferPlus1
,
1577 OUT PUCHAR
*ChunkBuffer
,
1583 RtlResetRtlTranslations (
1584 IN PNLSTABLEINFO NlsTable
1589 * RtlRetrieveUlong (
1590 * PULONG DestinationAddress,
1591 * PULONG SourceAddress
1594 #define RtlRetrieveUlong(DestAddress,SrcAddress) \
1595 if ((ULONG)(SrcAddress) & LONG_MASK) \
1597 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1598 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1599 ((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
1600 ((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
1604 *((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
1609 * RtlRetrieveUshort (
1610 * PUSHORT DestinationAddress,
1611 * PUSHORT SourceAddress
1614 #define RtlRetrieveUshort(DestAddress,SrcAddress) \
1615 if ((ULONG)(SrcAddress) & SHORT_MASK) \
1617 ((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
1618 ((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
1622 *((PUSHORT)(DestAddress))=*((PUSHORT)(SrcAddress)); \
1627 RtlSecondsSince1970ToTime (
1628 ULONG SecondsSince1970
,
1634 RtlSecondsSince1980ToTime (
1635 ULONG SecondsSince1980
,
1642 IN PRTL_BITMAP BitMapHeader
1648 PRTL_BITMAP BitMapHeader
,
1649 ULONG StartingIndex
,
1655 RtlSetDaclSecurityDescriptor (
1656 PSECURITY_DESCRIPTOR SecurityDescriptor
,
1657 BOOLEAN DaclPresent
,
1659 BOOLEAN DaclDefaulted
1664 RtlSetTimeZoneInformation (
1665 IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation
1683 #define RtlStoreUlong(Address,Value) \
1684 if ((ULONG)(Address) & LONG_MASK) \
1686 ((PUCHAR)(Address))[LONG_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1687 ((PUCHAR)(Address))[LONG_3RD_MOST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1688 ((PUCHAR)(Address))[LONG_2ND_MOST_SIGNIFICANT_BIT]=(UCHAR)(THIRDBYTE(Value)); \
1689 ((PUCHAR)(Address))[LONG_MOST_SIGNIFICANT_BIT]=(UCHAR)(FOURTHBYTE(Value)); \
1693 *((PULONG)(Address))=(ULONG)(Value); \
1703 #define RtlStoreUshort(Address,Value) \
1704 if ((ULONG)(Address) & SHORT_MASK) \
1706 ((PUCHAR)(Address))[SHORT_LEAST_SIGNIFICANT_BIT]=(UCHAR)(FIRSTBYTE(Value)); \
1707 ((PUCHAR)(Address))[SHORT_MOST_SIGNIFICANT_BIT]=(UCHAR)(SECONDBYTE(Value)); \
1711 *((PUSHORT)(Address))=(USHORT)(Value); \
1716 RtlTimeFieldsToTime (
1717 PTIME_FIELDS TimeFields
,
1723 RtlTimeToSecondsSince1970 (
1724 PLARGE_INTEGER Time
,
1725 PULONG SecondsSince1970
1730 RtlTimeToSecondsSince1980 (
1731 PLARGE_INTEGER Time
,
1732 PULONG SecondsSince1980
1737 RtlTimeToTimeFields (
1738 PLARGE_INTEGER Time
,
1739 PTIME_FIELDS TimeFields
1744 RtlUnicodeStringToAnsiSize (
1745 IN PUNICODE_STRING UnicodeString
1750 RtlUnicodeStringToAnsiString (
1751 IN OUT PANSI_STRING DestinationString
,
1752 IN PUNICODE_STRING SourceString
,
1753 IN BOOLEAN AllocateDestinationString
1758 RtlUnicodeStringToInteger (
1759 IN PUNICODE_STRING String
,
1766 RtlUnicodeStringToOemSize (
1767 IN PUNICODE_STRING UnicodeString
1772 RtlUnicodeStringToCountedOemString (
1773 IN OUT POEM_STRING DestinationString
,
1774 IN PUNICODE_STRING SourceString
,
1775 IN BOOLEAN AllocateDestinationString
1780 RtlUnicodeStringToOemString (
1781 IN OUT POEM_STRING DestinationString
,
1782 IN PUNICODE_STRING SourceString
,
1783 IN BOOLEAN AllocateDestinationString
1788 RtlUnicodeToCustomCPN (
1789 IN PCPTABLEINFO CustomCP
,
1793 PWCHAR UnicodeString
,
1799 RtlUnicodeToMultiByteN (
1803 PWCHAR UnicodeString
,
1809 RtlUnicodeToMultiByteSize (
1811 PWCHAR UnicodeString
,
1821 PWCHAR UnicodeString
,
1834 PEXCEPTION_REGISTRATION RegistrationFrame
,
1835 PVOID ReturnAddress
,
1836 PEXCEPTION_RECORD ExceptionRecord
,
1842 RtlUpcaseUnicodeChar (
1848 RtlUpcaseUnicodeString (
1849 IN OUT PUNICODE_STRING DestinationString
,
1850 IN PCUNICODE_STRING SourceString
,
1851 IN BOOLEAN AllocateDestinationString
1856 RtlUpcaseUnicodeStringToAnsiString (
1857 IN OUT PANSI_STRING DestinationString
,
1858 IN PUNICODE_STRING SourceString
,
1859 IN BOOLEAN AllocateDestinationString
1864 RtlUpcaseUnicodeStringToCountedOemString (
1865 IN OUT POEM_STRING DestinationString
,
1866 IN PUNICODE_STRING SourceString
,
1867 IN BOOLEAN AllocateDestinationString
1872 RtlUpcaseUnicodeStringToOemString (
1873 IN OUT POEM_STRING DestinationString
,
1874 IN PUNICODE_STRING SourceString
,
1875 IN BOOLEAN AllocateDestinationString
1880 RtlUpcaseUnicodeToCustomCPN (
1881 IN PCPTABLEINFO CustomCP
,
1885 PWCHAR UnicodeString
,
1891 RtlUpcaseUnicodeToMultiByteN (
1895 PWCHAR UnicodeString
,
1901 RtlUpcaseUnicodeToOemN (
1905 PWCHAR UnicodeString
,
1918 PSTRING DestinationString
,
1919 PSTRING SourceString
1932 RtlValidSecurityDescriptor (
1933 PSECURITY_DESCRIPTOR SecurityDescriptor
1937 RtlValidSid(IN PSID Sid
);
1941 RtlxAnsiStringToUnicodeSize (
1942 IN PANSI_STRING AnsiString
1947 RtlxOemStringToUnicodeSize (
1948 IN POEM_STRING OemString
1953 RtlxUnicodeStringToAnsiSize (
1954 IN PUNICODE_STRING UnicodeString
1959 RtlxUnicodeStringToOemSize (
1960 IN PUNICODE_STRING UnicodeString
1964 /* Register io functions */
1968 READ_REGISTER_UCHAR (
1974 READ_REGISTER_USHORT (
1980 READ_REGISTER_ULONG (
1986 READ_REGISTER_BUFFER_UCHAR (
1994 READ_REGISTER_BUFFER_USHORT (
2002 READ_REGISTER_BUFFER_ULONG (
2010 WRITE_REGISTER_UCHAR (
2017 WRITE_REGISTER_USHORT (
2024 WRITE_REGISTER_ULONG (
2031 WRITE_REGISTER_BUFFER_UCHAR (
2039 WRITE_REGISTER_BUFFER_USHORT (
2047 WRITE_REGISTER_BUFFER_ULONG (
2054 NTSTATUS STDCALL
RtlCreateAcl(PACL Acl
, ULONG AclSize
, ULONG AclRevision
);
2055 NTSTATUS STDCALL
RtlQueryInformationAcl (PACL Acl
, PVOID Information
, ULONG InformationLength
, ACL_INFORMATION_CLASS InformationClass
);
2056 NTSTATUS STDCALL
RtlSetInformationAcl (PACL Acl
, PVOID Information
, ULONG InformationLength
, ACL_INFORMATION_CLASS InformationClass
);
2057 BOOLEAN STDCALL
RtlValidAcl (PACL Acl
);
2059 NTSTATUS STDCALL
RtlAddAccessAllowedAce(PACL Acl
, ULONG Revision
, ACCESS_MASK AccessMask
, PSID Sid
);
2060 NTSTATUS STDCALL
RtlAddAccessDeniedAce(PACL Acl
, ULONG Revision
, ACCESS_MASK AccessMask
, PSID Sid
);
2061 NTSTATUS STDCALL
RtlAddAce(PACL Acl
, ULONG Revision
, ULONG StartingIndex
, PACE AceList
, ULONG AceListLength
);
2062 NTSTATUS STDCALL
RtlAddAuditAccessAce (PACL Acl
, ULONG Revision
, ACCESS_MASK AccessMask
, PSID Sid
, BOOLEAN Success
, BOOLEAN Failure
);
2063 NTSTATUS STDCALL
RtlDeleteAce(PACL Acl
, ULONG AceIndex
);
2064 BOOLEAN STDCALL
RtlFirstFreeAce(PACL Acl
, PACE
* Ace
);
2065 NTSTATUS STDCALL
RtlGetAce(PACL Acl
, ULONG AceIndex
, PACE
*Ace
);
2067 NTSTATUS STDCALL
RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD
, PSECURITY_DESCRIPTOR RelSD
, PULONG BufferLength
);
2068 NTSTATUS STDCALL
RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD
, PSECURITY_DESCRIPTOR RelSD
, PULONG BufferLength
);
2069 NTSTATUS STDCALL
RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, ULONG Revision
);
2070 BOOLEAN STDCALL
RtlValidSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
);
2071 ULONG STDCALL
RtlLengthSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
);
2072 NTSTATUS STDCALL
RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, BOOLEAN DaclPresent
, PACL Dacl
, BOOLEAN DaclDefaulted
);
2073 NTSTATUS STDCALL
RtlGetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PBOOLEAN DaclPresent
, PACL
* Dacl
, PBOOLEAN DaclDefauted
);
2074 NTSTATUS STDCALL
RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PSID Owner
, BOOLEAN OwnerDefaulted
);
2075 NTSTATUS STDCALL
RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PSID
* Owner
, PBOOLEAN OwnerDefaulted
);
2076 NTSTATUS STDCALL
RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PSID Group
, BOOLEAN GroupDefaulted
);
2077 NTSTATUS STDCALL
RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PSID
* Group
, PBOOLEAN GroupDefaulted
);
2078 NTSTATUS STDCALL
RtlGetControlSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PSECURITY_DESCRIPTOR_CONTROL Control
, PULONG Revision
);
2079 NTSTATUS STDCALL
RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, BOOLEAN SaclPresent
, PACL Sacl
, BOOLEAN SaclDefaulted
);
2080 NTSTATUS STDCALL
RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor
, PBOOLEAN SaclPresent
, PACL
* Sacl
, PBOOLEAN SaclDefauted
);
2081 NTSTATUS STDCALL
RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD
,
2082 PSECURITY_DESCRIPTOR AbsSD
,
2093 NTSTATUS STDCALL
RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
,
2094 UCHAR SubAuthorityCount
,
2095 ULONG SubAuthority0
,
2096 ULONG SubAuthority1
,
2097 ULONG SubAuthority2
,
2098 ULONG SubAuthority3
,
2099 ULONG SubAuthority4
,
2100 ULONG SubAuthority5
,
2101 ULONG SubAuthority6
,
2102 ULONG SubAuthority7
,
2104 ULONG STDCALL
RtlLengthRequiredSid (UCHAR SubAuthorityCount
);
2105 PSID_IDENTIFIER_AUTHORITY STDCALL
RtlIdentifierAuthoritySid (PSID Sid
);
2106 NTSTATUS STDCALL
RtlInitializeSid (PSID Sid
, PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
, UCHAR SubAuthorityCount
);
2107 PULONG STDCALL
RtlSubAuthoritySid (PSID Sid
, ULONG SubAuthority
);
2108 BOOLEAN STDCALL
RtlEqualPrefixSid (PSID Sid1
, PSID Sid2
);
2109 BOOLEAN STDCALL
RtlEqualSid(PSID Sid1
, PSID Sid2
);
2110 PSID STDCALL
RtlFreeSid (PSID Sid
);
2111 ULONG STDCALL
RtlLengthSid (PSID Sid
);
2112 PULONG STDCALL
RtlSubAuthoritySid (PSID Sid
, ULONG SubAuthority
);
2113 PUCHAR STDCALL
RtlSubAuthorityCountSid (PSID Sid
);
2114 BOOLEAN STDCALL
RtlValidSid (PSID Sid
);
2115 NTSTATUS STDCALL
RtlConvertSidToUnicodeString (PUNICODE_STRING String
, PSID Sid
, BOOLEAN AllocateBuffer
);
2117 BOOLEAN STDCALL
RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess
, ACCESS_MASK DesiredAccess
);
2118 BOOLEAN STDCALL
RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess
, ACCESS_MASK DesiredAccess
);
2119 VOID STDCALL
RtlMapGenericMask (PACCESS_MASK AccessMask
, PGENERIC_MAPPING GenericMapping
);
2122 RtlRandom (PULONG Seed
);
2124 PRTL_SPLAY_LINKS STDCALL
2125 RtlSubtreePredecessor (IN PRTL_SPLAY_LINKS Links
);
2127 PRTL_SPLAY_LINKS STDCALL
2128 RtlSubtreeSuccessor (IN PRTL_SPLAY_LINKS Links
);
2131 RtlUniform (PULONG Seed
);
2133 /* functions exported from NTOSKRNL.EXE which are considered RTL */
2135 #if defined(__NTOSKRNL__) || defined(__NTDRIVER__) || defined(__NTHAL__) || defined(__NTDLL__) || defined(__NTAPP__)
2137 char *_itoa (int value
, char *string
, int radix
);
2138 int _snprintf(char * buf
, size_t cnt
, const char *fmt
, ...);
2139 int _snwprintf(wchar_t *buf
, size_t cnt
, const wchar_t *fmt
, ...);
2140 int _stricmp(const char *s1
, const char *s2
);
2141 char * _strlwr(char *x
);
2142 int _strnicmp(const char *s1
, const char *s2
, size_t n
);
2143 char * _strnset(char* szToFill
, int szFill
, size_t sizeMaxFill
);
2144 char * _strrev(char *s
);
2145 char * _strset(char* szToFill
, int szFill
);
2146 char * _strupr(char *x
);
2147 int _vsnprintf(char *buf
, size_t cnt
, const char *fmt
, va_list args
);
2148 int _wcsicmp (const wchar_t* cs
, const wchar_t* ct
);
2149 wchar_t * _wcslwr (wchar_t *x
);
2150 int _wcsnicmp (const wchar_t * cs
,const wchar_t * ct
,size_t count
);
2151 wchar_t* _wcsnset (wchar_t* wsToFill
, wchar_t wcFill
, size_t sizeMaxFill
);
2152 wchar_t * _wcsrev(wchar_t *s
);
2153 wchar_t *_wcsupr(wchar_t *x
);
2155 int atoi(const char *str
);
2156 long atol(const char *str
);
2162 int isxdigit(int c
);
2163 size_t mbstowcs (wchar_t *wcstr
, const char *mbstr
, size_t count
);
2164 int mbtowc (wchar_t *wchar
, const char *mbchar
, size_t count
);
2165 void * memchr(const void *s
, int c
, size_t n
);
2166 void * memcpy(void *to
, const void *from
, size_t count
);
2167 void * memmove(void *dest
,const void *src
, size_t count
);
2168 void * memset(void *src
, int val
, size_t count
);
2175 int sprintf(char * buf
, const char *fmt
, ...);
2176 void srand(unsigned seed
);
2177 char * strcat(char *s
, const char *append
);
2178 char * strchr(const char *s
, int c
);
2179 int strcmp(const char *s1
, const char *s2
);
2180 char * strcpy(char *to
, const char *from
);
2181 size_t strlen(const char *str
);
2182 char * strncat(char *dst
, const char *src
, size_t n
);
2183 int strncmp(const char *s1
, const char *s2
, size_t n
);
2184 char *strncpy(char *dst
, const char *src
, size_t n
);
2185 char *strrchr(const char *s
, int c
);
2186 size_t strspn(const char *s1
, const char *s2
);
2187 char *strstr(const char *s
, const char *find
);
2188 int swprintf(wchar_t *buf
, const wchar_t *fmt
, ...);
2191 wchar_t towlower(wchar_t c
);
2192 wchar_t towupper(wchar_t c
);
2193 int vsprintf(char *buf
, const char *fmt
, va_list args
);
2194 wchar_t * wcscat(wchar_t *dest
, const wchar_t *src
);
2195 wchar_t * wcschr(const wchar_t *str
, wchar_t ch
);
2196 int wcscmp(const wchar_t *cs
, const wchar_t *ct
);
2197 wchar_t* wcscpy(wchar_t* str1
, const wchar_t* str2
);
2198 size_t wcscspn(const wchar_t *str
,const wchar_t *reject
);
2199 size_t wcslen(const wchar_t *s
);
2200 wchar_t * wcsncat(wchar_t *dest
, const wchar_t *src
, size_t count
);
2201 int wcsncmp(const wchar_t *cs
, const wchar_t *ct
, size_t count
);
2202 wchar_t * wcsncpy(wchar_t *dest
, const wchar_t *src
, size_t count
);
2203 wchar_t * wcsrchr(const wchar_t *str
, wchar_t ch
);
2204 size_t wcsspn(const wchar_t *str
,const wchar_t *accept
);
2205 wchar_t *wcsstr(const wchar_t *s
,const wchar_t *b
);
2206 size_t wcstombs (char *mbstr
, const wchar_t *wcstr
, size_t count
);
2207 int wctomb (char *mbchar
, wchar_t wchar
);
2209 #endif /* __NTOSKRNL__ || __NTDRIVER__ || __NTHAL__ || __NTDLL__ || __NTAPP__ */
2211 #endif /* __DDK_RTL_H */