2 * PROJECT: ReactOS Native Headers
3 * FILE: include/ndk/rtlfuncs.h
4 * PURPOSE: Prototypes for Runtime Library Functions not defined in DDK/IFS
5 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
12 /* DEPENDENCIES **************************************************************/
15 #include <ddk/ntnls.h>
17 /* PROTOTYPES ****************************************************************/
20 * Error and Exception Functions
24 RtlAddVectoredExceptionHandler(
25 IN ULONG FirstHandler
,
26 IN PVECTORED_EXCEPTION_HANDLER VectoredHandler
32 PVOID FailedAssertion
,
40 RtlEncodePointer(IN PVOID Pointer
);
44 RtlDecodePointer(IN PVOID Pointer
);
48 RtlNtStatusToDosError(IN NTSTATUS Status
);
52 RtlRaiseException(IN PEXCEPTION_RECORD ExceptionRecord
);
56 RtlRaiseStatus(NTSTATUS Status
);
61 PEXCEPTION_REGISTRATION RegistrationFrame
,
63 PEXCEPTION_RECORD ExceptionRecord
,
83 IN PVOID BaseAddress OPTIONAL
,
84 IN ULONG SizeToReserve OPTIONAL
,
85 IN ULONG SizeToCommit OPTIONAL
,
86 IN PVOID Lock OPTIONAL
,
87 IN PRTL_HEAP_DEFINITION Definition OPTIONAL
99 RtlDestroyHeap(HANDLE hheap
);
104 IN HANDLE HeapHandle
,
127 RtlLockHeap(IN HANDLE Heap
);
131 RtlUnlockHeap(IN HANDLE Heap
);
138 IN PVOID MemoryPointer
149 #define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap)
157 RtlAbsoluteToSelfRelativeSD(
158 IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor
,
159 IN OUT PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor
,
160 IN PULONG BufferLength
165 RtlAddAccessAllowedAce(
168 ACCESS_MASK AccessMask
,
174 RtlAddAccessAllowedAceEx(
176 IN DWORD dwAceRevision
,
184 RtlAddAccessDeniedAce(
187 ACCESS_MASK AccessMask
,
193 RtlAddAccessDeniedAceEx(
197 IN ACCESS_MASK AccessMask
,
203 RtlAddAuditAccessAceEx(
207 IN ACCESS_MASK AccessMask
,
225 RtlAddAuditAccessAce(
228 ACCESS_MASK AccessMask
,
236 RtlAllocateAndInitializeSid(
237 IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
,
238 IN UCHAR SubAuthorityCount
,
239 IN ULONG SubAuthority0
,
240 IN ULONG SubAuthority1
,
241 IN ULONG SubAuthority2
,
242 IN ULONG SubAuthority3
,
243 IN ULONG SubAuthority4
,
244 IN ULONG SubAuthority5
,
245 IN ULONG SubAuthority6
,
246 IN ULONG SubAuthority7
,
252 RtlAreAllAccessesGranted(
253 ACCESS_MASK GrantedAccess
,
254 ACCESS_MASK DesiredAccess
259 RtlAreAnyAccessesGranted(
260 ACCESS_MASK GrantedAccess
,
261 ACCESS_MASK DesiredAccess
273 RtlCopyLuidAndAttributesArray(
275 PLUID_AND_ATTRIBUTES Src
,
276 PLUID_AND_ATTRIBUTES Dest
281 RtlCopySidAndAttributesArray(
283 PSID_AND_ATTRIBUTES Src
,
285 PSID_AND_ATTRIBUTES Dest
,
287 PVOID
* RemainingSidArea
,
288 PULONG RemainingSidAreaSize
293 RtlConvertSidToUnicodeString(
294 OUT PUNICODE_STRING DestinationString
,
296 IN BOOLEAN AllocateDestinationString
317 RtlCreateSecurityDescriptor(
318 PSECURITY_DESCRIPTOR SecurityDescriptor
,
324 RtlCreateSecurityDescriptorRelative(
325 PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor
,
373 RtlGetControlSecurityDescriptor(
374 PSECURITY_DESCRIPTOR SecurityDescriptor
,
375 PSECURITY_DESCRIPTOR_CONTROL Control
,
381 RtlGetDaclSecurityDescriptor(
382 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
383 OUT PBOOLEAN DaclPresent
,
385 OUT PBOOLEAN DaclDefaulted
390 RtlGetSaclSecurityDescriptor(
391 PSECURITY_DESCRIPTOR SecurityDescriptor
,
392 PBOOLEAN SaclPresent
,
394 PBOOLEAN SaclDefaulted
399 RtlGetGroupSecurityDescriptor(
400 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
402 OUT PBOOLEAN GroupDefaulted
407 RtlGetOwnerSecurityDescriptor(
408 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
410 OUT PBOOLEAN OwnerDefaulted
415 RtlGetSecurityDescriptorRMControl(
416 PSECURITY_DESCRIPTOR SecurityDescriptor
,
420 PSID_IDENTIFIER_AUTHORITY
422 RtlIdentifierAuthoritySid(PSID Sid
);
426 RtlImpersonateSelf(IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
);
432 IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
,
433 IN UCHAR SubAuthorityCount
438 RtlLengthRequiredSid(IN UCHAR SubAuthorityCount
);
442 RtlLengthSid(IN PSID Sid
);
447 PACCESS_MASK AccessMask
,
448 PGENERIC_MAPPING GenericMapping
453 RtlQueryInformationAcl(
456 ULONG InformationLength
,
457 ACL_INFORMATION_CLASS InformationClass
462 RtlSelfRelativeToAbsoluteSD(
463 IN PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSD
,
464 OUT PSECURITY_DESCRIPTOR AbsoluteSD
,
465 IN PULONG AbsoluteSDSize
,
472 IN PSID PrimaryGroup
,
473 IN PULONG PrimaryGroupSize
478 RtlSetControlSecurityDescriptor(
479 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
480 IN SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest
,
481 IN SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet
486 RtlSetDaclSecurityDescriptor (
487 PSECURITY_DESCRIPTOR SecurityDescriptor
,
490 BOOLEAN DaclDefaulted
495 RtlSetGroupSecurityDescriptor(
496 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor
,
498 IN BOOLEAN GroupDefaulted
503 RtlSetInformationAcl(
506 ULONG InformationLength
,
507 ACL_INFORMATION_CLASS InformationClass
512 RtlSetOwnerSecurityDescriptor(
513 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor
,
515 IN BOOLEAN OwnerDefaulted
520 RtlSetSaclSecurityDescriptor(
521 IN OUT PSECURITY_DESCRIPTOR SecurityDescriptor
,
522 IN BOOLEAN SaclPresent
,
524 IN BOOLEAN SaclDefaulted
529 RtlSetSecurityDescriptorRMControl(
530 PSECURITY_DESCRIPTOR SecurityDescriptor
,
536 RtlSubAuthorityCountSid(
544 IN ULONG SubAuthority
549 RtlValidRelativeSecurityDescriptor(
550 IN PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput
,
551 IN ULONG SecurityDescriptorLength
,
552 IN SECURITY_INFORMATION RequiredInformation
557 RtlValidSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor
);
561 RtlValidSid(IN PSID Sid
);
565 RtlValidAcl(PACL Acl
);
569 RtlDeleteSecurityObject(
570 IN PSECURITY_DESCRIPTOR
*ObjectDescriptor
575 RtlNewSecurityObject(
576 IN PSECURITY_DESCRIPTOR ParentDescriptor
,
577 IN PSECURITY_DESCRIPTOR CreatorDescriptor
,
578 OUT PSECURITY_DESCRIPTOR
*NewDescriptor
,
579 IN BOOLEAN IsDirectoryObject
,
581 IN PGENERIC_MAPPING GenericMapping
586 RtlQuerySecurityObject(
587 IN PSECURITY_DESCRIPTOR ObjectDescriptor
,
588 IN SECURITY_INFORMATION SecurityInformation
,
589 OUT PSECURITY_DESCRIPTOR ResultantDescriptor
,
590 IN ULONG DescriptorLength
,
591 OUT PULONG ReturnLength
596 RtlSetSecurityObject(
597 IN SECURITY_INFORMATION SecurityInformation
,
598 IN PSECURITY_DESCRIPTOR ModificationDescriptor
,
599 OUT PSECURITY_DESCRIPTOR
*ObjectsSecurityDescriptor
,
600 IN PGENERIC_MAPPING GenericMapping
,
605 * Single-Character Functions
609 RtlLargeIntegerToChar(
610 IN PLARGE_INTEGER Value
,
618 RtlUpperChar(CHAR Source
);
622 RtlUpcaseUnicodeChar(WCHAR Source
);
626 RtlDowncaseUnicodeChar(IN WCHAR Source
);
641 IN ULONG Base OPTIONAL
,
642 IN ULONG Length OPTIONAL
,
648 RtlIntegerToUnicodeString(
651 IN OUT PUNICODE_STRING String
664 RtlUshortByteSwap(IN USHORT Source
);
667 * Unicode->Ansi String Functions
671 RtlUnicodeStringToAnsiSize(IN PUNICODE_STRING UnicodeString
);
675 RtlUnicodeStringToAnsiString(
676 PANSI_STRING DestinationString
,
677 PUNICODE_STRING SourceString
,
678 BOOLEAN AllocateDestinationString
682 * Unicode->OEM String Functions
686 RtlUpcaseUnicodeStringToOemString(
687 POEM_STRING DestinationString
,
688 PUNICODE_STRING SourceString
,
689 BOOLEAN AllocateDestinationString
694 RtlUpcaseUnicodeStringToCountedOemString(
695 IN OUT POEM_STRING DestinationString
,
696 IN PUNICODE_STRING SourceString
,
697 IN BOOLEAN AllocateDestinationString
702 RtlUpcaseUnicodeString(
703 PUNICODE_STRING DestinationString
,
704 PCUNICODE_STRING SourceString
,
705 BOOLEAN AllocateDestinationString
710 RtlUnicodeStringToOemString(
711 POEM_STRING DestinationString
,
712 PUNICODE_STRING SourceString
,
713 BOOLEAN AllocateDestinationString
718 RtlUpcaseUnicodeToOemN(
722 PWCHAR UnicodeString
,
728 RtlUnicodeStringToOemSize(IN PUNICODE_STRING UnicodeString
);
736 PWCHAR UnicodeString
,
741 * Unicode->MultiByte String Functions
745 RtlUnicodeToMultiByteN(
749 PWCHAR UnicodeString
,
755 RtlUpcaseUnicodeToMultiByteN(
759 PWCHAR UnicodeString
,
765 RtlUnicodeToMultiByteSize(
767 PWCHAR UnicodeString
,
772 * OEM to Unicode Functions
776 RtlOemStringToUnicodeSize(POEM_STRING AnsiString
);
780 RtlOemStringToUnicodeString(
781 PUNICODE_STRING DestinationString
,
782 POEM_STRING SourceString
,
783 BOOLEAN AllocateDestinationString
790 ULONG MaxBytesInUnicodeString
,
791 PULONG BytesInUnicodeString
,
793 ULONG BytesInOemString
797 * Ansi->Unicode String Functions
801 RtlAnsiStringToUnicodeString(
802 PUNICODE_STRING DestinationString
,
803 PANSI_STRING SourceString
,
804 BOOLEAN AllocateDestinationString
809 RtlAnsiStringToUnicodeSize(
810 PANSI_STRING AnsiString
815 RtlCreateUnicodeStringFromAsciiz(
816 OUT PUNICODE_STRING Destination
,
821 * Unicode String Functions
825 RtlAppendUnicodeToString(
826 PUNICODE_STRING Destination
,
832 RtlAppendUnicodeStringToString(
833 PUNICODE_STRING Destination
,
834 PUNICODE_STRING Source
839 RtlCompareUnicodeString(
840 PUNICODE_STRING String1
,
841 PUNICODE_STRING String2
,
842 BOOLEAN CaseInsensitive
847 RtlCopyUnicodeString(
848 PUNICODE_STRING DestinationString
,
849 PUNICODE_STRING SourceString
854 RtlCreateUnicodeString(
855 PUNICODE_STRING DestinationString
,
861 RtlEqualUnicodeString(
862 PCUNICODE_STRING String1
,
863 PCUNICODE_STRING String2
,
864 BOOLEAN CaseInsensitive
869 RtlFreeUnicodeString(IN PUNICODE_STRING UnicodeString
);
873 RtlInitUnicodeString(
874 IN OUT PUNICODE_STRING DestinationString
,
875 IN PCWSTR SourceString
);
887 RtlPrefixUnicodeString(
888 PUNICODE_STRING String1
,
889 PUNICODE_STRING String2
,
890 BOOLEAN CaseInsensitive
895 RtlUnicodeStringToInteger(
896 PUNICODE_STRING String
,
903 RtlHashUnicodeString(
904 IN CONST UNICODE_STRING
*String
,
905 IN BOOLEAN CaseInSensitive
,
906 IN ULONG HashAlgorithm
,
907 OUT PULONG HashValue
);
910 * Ansi String Functions
914 RtlFreeAnsiString(IN PANSI_STRING AnsiString
);
919 PANSI_STRING DestinationString
,
924 * OEM String Functions
928 RtlFreeOemString(IN POEM_STRING OemString
);
931 * MultiByte->Unicode String Functions
935 RtlMultiByteToUnicodeN(
936 PWCHAR UnicodeString
,
939 const PCHAR MbString
,
945 RtlMultiByteToUnicodeSize(
956 RtlAddAtomToAtomTable(
957 IN PRTL_ATOM_TABLE AtomTable
,
966 IN OUT PRTL_ATOM_TABLE
*AtomTable
971 RtlDeleteAtomFromAtomTable(
972 IN PRTL_ATOM_TABLE AtomTable
,
978 RtlDestroyAtomTable(IN PRTL_ATOM_TABLE AtomTable
);
982 RtlQueryAtomInAtomTable(
983 IN PRTL_ATOM_TABLE AtomTable
,
985 IN OUT PULONG RefCount OPTIONAL
,
986 IN OUT PULONG PinCount OPTIONAL
,
987 IN OUT PWSTR AtomName OPTIONAL
,
988 IN OUT PULONG NameLength OPTIONAL
993 RtlLookupAtomInAtomTable(
994 IN PRTL_ATOM_TABLE AtomTable
,
1005 IN
const VOID
*Source1
,
1006 IN
const VOID
*Source2
,
1013 IN PVOID Destination
,
1019 * Process Management Functions
1023 RtlAcquirePebLock(VOID
);
1027 RtlCreateProcessParameters (
1028 OUT PRTL_USER_PROCESS_PARAMETERS
*ProcessParameters
,
1029 IN PUNICODE_STRING ImagePathName OPTIONAL
,
1030 IN PUNICODE_STRING DllPath OPTIONAL
,
1031 IN PUNICODE_STRING CurrentDirectory OPTIONAL
,
1032 IN PUNICODE_STRING CommandLine OPTIONAL
,
1033 IN PWSTR Environment OPTIONAL
,
1034 IN PUNICODE_STRING WindowTitle OPTIONAL
,
1035 IN PUNICODE_STRING DesktopInfo OPTIONAL
,
1036 IN PUNICODE_STRING ShellInfo OPTIONAL
,
1037 IN PUNICODE_STRING RuntimeInfo OPTIONAL
1042 RtlCreateUserProcess(
1043 IN PUNICODE_STRING ImageFileName
,
1044 IN ULONG Attributes
,
1045 IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters
,
1046 IN PSECURITY_DESCRIPTOR ProcessSecutityDescriptor OPTIONAL
,
1047 IN PSECURITY_DESCRIPTOR ThreadSecurityDescriptor OPTIONAL
,
1048 IN HANDLE ParentProcess OPTIONAL
,
1049 IN BOOLEAN CurrentDirectory
,
1050 IN HANDLE DebugPort OPTIONAL
,
1051 IN HANDLE ExceptionPort OPTIONAL
,
1052 OUT PRTL_USER_PROCESS_INFORMATION ProcessInfo
1057 RtlCreateUserThread(
1058 IN HANDLE ProcessHandle
,
1059 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
1060 IN BOOLEAN CreateSuspended
,
1061 IN LONG StackZeroBits
,
1062 IN ULONG StackReserve
,
1063 IN ULONG StackCommit
,
1064 IN PTHREAD_START_ROUTINE StartAddress
,
1066 IN OUT PHANDLE ThreadHandle
,
1067 IN OUT PCLIENT_ID ClientId
1070 PRTL_USER_PROCESS_PARAMETERS
1072 RtlDeNormalizeProcessParams(IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters
);
1076 RtlDestroyProcessParameters(IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters
);
1080 RtlExitUserThread(NTSTATUS Status
);
1084 RtlInitializeContext(
1085 IN HANDLE ProcessHandle
,
1086 OUT PCONTEXT ThreadContext
,
1087 IN PVOID ThreadStartParam OPTIONAL
,
1088 IN PTHREAD_START_ROUTINE ThreadStartAddress
,
1089 IN PINITIAL_TEB InitialTeb
1092 PRTL_USER_PROCESS_PARAMETERS
1094 RtlNormalizeProcessParams(IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters
);
1098 RtlReleasePebLock(VOID
);
1101 * Environment/Path Functions
1105 RtlCreateEnvironment(
1112 RtlDestroyEnvironment(PWSTR Environment
);
1116 RtlDoesFileExists_U(PWSTR FileName
);
1120 RtlDetermineDosPathNameType_U(PCWSTR Path
);
1135 RtlDosPathNameToNtPathName_U(
1137 PUNICODE_STRING NtName
,
1139 PCURDIR CurrentDirectory
1144 RtlExpandEnvironmentStrings_U(
1146 PUNICODE_STRING Source
,
1147 PUNICODE_STRING Destination
,
1153 RtlGetCurrentDirectory_U(
1154 ULONG MaximumLength
,
1160 RtlGetFullPathName_U(
1161 const WCHAR
*dosname
,
1169 RtlIsNameLegalDOS8Dot3(
1170 IN PUNICODE_STRING UnicodeName
,
1171 IN PANSI_STRING AnsiName
,
1177 RtlQueryEnvironmentVariable_U(
1179 PUNICODE_STRING Name
,
1180 PUNICODE_STRING Value
1185 RtlSetCurrentDirectory_U(PUNICODE_STRING name
);
1189 RtlSetEnvironmentVariable(
1191 PUNICODE_STRING Name
,
1192 PUNICODE_STRING Value
1196 * Critical Section/Resource Functions
1200 RtlDeleteCriticalSection (
1201 IN PRTL_CRITICAL_SECTION CriticalSection
1206 RtlEnterCriticalSection(
1207 IN PRTL_CRITICAL_SECTION CriticalSection
1212 RtlInitializeCriticalSection(
1213 IN PRTL_CRITICAL_SECTION CriticalSection
1218 RtlInitializeCriticalSectionAndSpinCount(
1219 IN PRTL_CRITICAL_SECTION CriticalSection
,
1225 RtlLeaveCriticalSection(
1226 IN PRTL_CRITICAL_SECTION CriticalSection
1231 RtlpUnWaitCriticalSection(
1232 IN PRTL_CRITICAL_SECTION CriticalSection
1237 RtlpWaitForCriticalSection(
1238 IN PRTL_CRITICAL_SECTION CriticalSection
1243 RtlAcquireResourceExclusive(
1244 IN PRTL_RESOURCE Resource
,
1250 RtlAcquireResourceShared(
1251 IN PRTL_RESOURCE Resource
,
1257 RtlConvertExclusiveToShared(
1258 IN PRTL_RESOURCE Resource
1263 RtlConvertSharedToExclusive(
1264 IN PRTL_RESOURCE Resource
1270 IN PRTL_RESOURCE Resource
1276 IN PRTL_RESOURCE Resource
1281 RtlInitializeResource(
1282 IN PRTL_RESOURCE Resource
1288 IN PRTL_RESOURCE Resource
1292 * Compression Functions
1297 IN USHORT CompressionFormatAndEngine
,
1298 IN PUCHAR UncompressedBuffer
,
1299 IN ULONG UncompressedBufferSize
,
1300 OUT PUCHAR CompressedBuffer
,
1301 IN ULONG CompressedBufferSize
,
1302 IN ULONG UncompressedChunkSize
,
1303 OUT PULONG FinalCompressedSize
,
1309 RtlDecompressBuffer(
1310 IN USHORT CompressionFormat
,
1311 OUT PUCHAR UncompressedBuffer
,
1312 IN ULONG UncompressedBufferSize
,
1313 IN PUCHAR CompressedBuffer
,
1314 IN ULONG CompressedBufferSize
,
1315 OUT PULONG FinalUncompressedSize
1320 RtlGetCompressionWorkSpaceSize(
1321 IN USHORT CompressionFormatAndEngine
,
1322 OUT PULONG CompressBufferWorkSpaceSize
,
1323 OUT PULONG CompressFragmentWorkSpaceSize
1327 * Debug Info Functions
1331 RtlCreateQueryDebugBuffer(
1333 IN BOOLEAN EventPair
1338 RtlDestroyQueryDebugBuffer(IN PDEBUG_BUFFER DebugBuffer
);
1342 RtlQueryProcessDebugInformation(
1344 IN ULONG DebugInfoClassMask
,
1345 IN OUT PDEBUG_BUFFER DebugBuffer
1354 IN PRTL_BITMAP BitMapHeader
,
1355 IN ULONG StartingIndex
,
1362 IN PRTL_BITMAP BitMapHeader
,
1363 IN ULONG StartingIndex
,
1370 IN PRTL_BITMAP BitMapHeader
,
1371 IN ULONG StartingIndex
,
1372 IN ULONG NumberToClear
1378 IN PRTL_BITMAP BitMapHeader
,
1379 IN ULONG NumberToFind
,
1385 RtlFindClearBitsAndSet(
1386 IN PRTL_BITMAP BitMapHeader
,
1387 IN ULONG NumberToFind
,
1393 RtlInitializeBitMap(
1394 IN PRTL_BITMAP BitMapHeader
,
1395 IN PULONG BitMapBuffer
,
1396 IN ULONG SizeOfBitMap
1402 IN PRTL_BITMAP BitMapHeader
,
1403 IN ULONG StartingIndex
,
1404 IN ULONG NumberToSet
1415 WAITORTIMERCALLBACKFUNC Callback
,
1424 RtlCreateTimerQueue(PHANDLE TimerQueue
);
1431 HANDLE CompletionEvent
1445 RtlDeleteTimerQueueEx(
1447 HANDLE CompletionEvent
1452 RtlDeleteTimerQueue(HANDLE TimerQueue
);
1466 DbgBreakPoint(VOID
);
1469 * Handle Table Functions
1471 PRTL_HANDLE_TABLE_ENTRY
1474 IN PRTL_HANDLE_TABLE HandleTable
,
1480 RtlDestroyHandleTable(IN PRTL_HANDLE_TABLE HandleTable
);
1485 IN PRTL_HANDLE_TABLE HandleTable
,
1486 IN PRTL_HANDLE_TABLE_ENTRY Handle
1491 RtlInitializeHandleTable(
1493 IN ULONG HandleSize
,
1494 IN PRTL_HANDLE_TABLE HandleTable
1500 IN PRTL_HANDLE_TABLE HandleTable
,
1501 IN PRTL_HANDLE_TABLE_ENTRY Handle
1506 RtlIsValidIndexHandle(
1507 IN PRTL_HANDLE_TABLE HandleTable
,
1508 IN OUT PRTL_HANDLE_TABLE_ENTRY
*Handle
,
1518 IN PVOID BaseAddress
,
1522 OUT PRTL_MESSAGE_RESOURCE_ENTRY
*MessageResourceEntry
1527 RtlGetNtGlobalFlags(VOID
);
1531 RtlImageDirectoryEntryToData(
1541 PIMAGE_NT_HEADERS NtHeader
,
1544 PIMAGE_SECTION_HEADER
*SectionHeader
1549 RtlImageNtHeader(IN PVOID BaseAddress
);
1551 PIMAGE_SECTION_HEADER
1553 RtlImageRvaToSection(
1554 PIMAGE_NT_HEADERS NtHeader
,
1560 * Registry Functions
1564 RtlCheckRegistryKey(
1571 RtlFormatCurrentUserKeyPath(IN OUT PUNICODE_STRING KeyPath
);
1576 OUT HANDLE KeyHandle
,
1577 IN ACCESS_MASK DesiredAccess
,
1578 IN POBJECT_ATTRIBUTES ObjectAttributes
,
1585 IN ACCESS_MASK DesiredAccess
,
1586 OUT PHANDLE KeyHandle
1591 RtlQueryRegistryValues(
1592 IN ULONG RelativeTo
,
1594 IN PRTL_QUERY_REGISTRY_TABLE QueryTable
,
1596 IN PVOID Environment
1601 RtlWriteRegistryValue(
1616 IN PUSHORT AnsiTableBase
,
1617 IN PUSHORT OemTableBase
,
1618 IN PUSHORT CaseTableBase
,
1619 OUT PNLSTABLEINFO NlsTable
1624 RtlInitCodePageTable(
1625 IN PUSHORT TableBase
,
1626 OUT PCPTABLEINFO CodePageTable
1631 RtlResetRtlTranslations(IN PNLSTABLEINFO NlsTable
);
1634 * Misc conversion functions
1638 RtlConvertLongToLargeInteger(IN LONG SignedInteger
);
1642 RtlEnlargedIntegerMultiply(
1649 RtlEnlargedUnsignedDivide(
1650 ULARGE_INTEGER Dividend
,
1657 RtlEnlargedUnsignedMultiply(
1664 RtlUniform(PULONG Seed
);
1671 RtlQueryTimeZoneInformation(LPTIME_ZONE_INFORMATION TimeZoneInformation
);
1675 RtlSecondsSince1970ToTime(
1676 IN ULONG SecondsSince1970
,
1677 OUT PLARGE_INTEGER Time
1682 RtlSetTimeZoneInformation(LPTIME_ZONE_INFORMATION TimeZoneInformation
);
1686 RtlTimeFieldsToTime(
1687 PTIME_FIELDS TimeFields
,
1693 RtlTimeToTimeFields(
1694 PLARGE_INTEGER Time
,
1695 PTIME_FIELDS TimeFields
1703 RtlVerifyVersionInfo(
1704 IN PRTL_OSVERSIONINFOEXW VersionInfo
,
1706 IN ULONGLONG ConditionMask
1711 RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation
);
1714 * C Runtime Library Functions
1716 char *_itoa (int value
, char *string
, int radix
);
1717 wchar_t *_itow (int value
, wchar_t *string
, int radix
);
1718 int _snprintf(char * buf
, size_t cnt
, const char *fmt
, ...);
1719 int _snwprintf(wchar_t *buf
, size_t cnt
, const wchar_t *fmt
, ...);
1720 int _stricmp(const char *s1
, const char *s2
);
1721 char * _strlwr(char *x
);
1722 int _strnicmp(const char *s1
, const char *s2
, size_t n
);
1723 char * _strnset(char* szToFill
, int szFill
, size_t sizeMaxFill
);
1724 char * _strrev(char *s
);
1725 char * _strset(char* szToFill
, int szFill
);
1726 char * _strupr(char *x
);
1727 int _vsnprintf(char *buf
, size_t cnt
, const char *fmt
, va_list args
);
1728 int _wcsicmp (const wchar_t* cs
, const wchar_t* ct
);
1729 wchar_t * _wcslwr (wchar_t *x
);
1730 int _wcsnicmp (const wchar_t * cs
,const wchar_t * ct
,size_t count
);
1731 wchar_t* _wcsnset (wchar_t* wsToFill
, wchar_t wcFill
, size_t sizeMaxFill
);
1732 wchar_t * _wcsrev(wchar_t *s
);
1733 wchar_t *_wcsupr(wchar_t *x
);
1734 int atoi(const char *str
);
1735 long atol(const char *str
);
1742 int isxdigit(int c
);
1743 size_t mbstowcs (wchar_t *wcstr
, const char *mbstr
, size_t count
);
1744 int mbtowc (wchar_t *wchar
, const char *mbchar
, size_t count
);
1745 void * memchr(const void *s
, int c
, size_t n
);
1746 void * memcpy(void *to
, const void *from
, size_t count
);
1747 void * memmove(void *dest
,const void *src
, size_t count
);
1748 void * memset(void *src
, int val
, size_t count
);
1750 int sprintf(char * buf
, const char *fmt
, ...);
1751 void srand(unsigned seed
);
1752 char * strcat(char *s
, const char *append
);
1753 char * strchr(const char *s
, int c
);
1754 int strcmp(const char *s1
, const char *s2
);
1755 char * strcpy(char *to
, const char *from
);
1756 size_t strlen(const char *str
);
1757 char * strncat(char *dst
, const char *src
, size_t n
);
1758 int strncmp(const char *s1
, const char *s2
, size_t n
);
1759 char *strncpy(char *dst
, const char *src
, size_t n
);
1760 char *strrchr(const char *s
, int c
);
1761 size_t strspn(const char *s1
, const char *s2
);
1762 char *strstr(const char *s
, const char *find
);
1763 int swprintf(wchar_t *buf
, const wchar_t *fmt
, ...);
1766 wchar_t towlower(wchar_t c
);
1767 wchar_t towupper(wchar_t c
);
1768 int vsprintf(char *buf
, const char *fmt
, va_list args
);
1769 wchar_t * wcscat(wchar_t *dest
, const wchar_t *src
);
1770 wchar_t * wcschr(const wchar_t *str
, wchar_t ch
);
1771 int wcscmp(const wchar_t *cs
, const wchar_t *ct
);
1772 wchar_t* wcscpy(wchar_t* str1
, const wchar_t* str2
);
1773 size_t wcscspn(const wchar_t *str
,const wchar_t *reject
);
1774 size_t wcslen(const wchar_t *s
);
1775 wchar_t * wcsncat(wchar_t *dest
, const wchar_t *src
, size_t count
);
1776 int wcsncmp(const wchar_t *cs
, const wchar_t *ct
, size_t count
);
1777 wchar_t * wcsncpy(wchar_t *dest
, const wchar_t *src
, size_t count
);
1778 wchar_t * wcsrchr(const wchar_t *str
, wchar_t ch
);
1779 size_t wcsspn(const wchar_t *str
,const wchar_t *accept
);
1780 wchar_t *wcsstr(const wchar_t *s
,const wchar_t *b
);
1781 size_t wcstombs (char *mbstr
, const wchar_t *wcstr
, size_t count
);
1782 int wctomb (char *mbchar
, wchar_t wchar
);