1 /* 2 * winternl.h 3 * 4 * Windows NT internal data structures and functions 5 * 6 * Note: This header exists only for compatibility with the native SDK. 7 * It's definitions are incomplete and potentially unsuitable. 8 * ReactOS modules should not make use of it! 9 * 10 * USE NDK INSTEAD! 11 * 12 * This file is part of the ReactOS PSDK package. 13 * 14 * Contributors: 15 * Timo Kreuzer (timo.kreuzer@reactos.org) 16 * 17 * THIS SOFTWARE IS NOT COPYRIGHTED 18 * 19 * This source code is offered for use in the public domain. You may 20 * use, modify or distribute it freely. 21 * 22 * This code is distributed in the hope that it will be useful but 23 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 24 * DISCLAIMED. This includes but is not limited to warranties of 25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 26 * 27 */ 28 #pragma once 29 30 #ifdef __REACTOS__ 31 #error "Do not use this header, use NDK!" 32 #endif 33 34 #ifndef _WINTERNL_ 35 #define _WINTERNL_ 36 37 //#include <winapifamily.h> 38 #include <windef.h> 39 40 #ifdef __cplusplus 41 extern "C" { 42 #endif 43 44 typedef _Return_type_success_(return >= 0) LONG NTSTATUS; 45 46 #ifndef NT_SUCCESS 47 #define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) 48 #endif 49 50 #ifndef NT_INFORMATION 51 #define NT_INFORMATION(Status) ((((ULONG)(Status)) >> 30) == 1) 52 #endif 53 54 #ifndef NT_WARNING 55 #define NT_WARNING(Status) ((((ULONG)(Status)) >> 30) == 2) 56 #endif 57 58 #ifndef NT_ERROR 59 #define NT_ERROR(Status) ((((ULONG)(Status)) >> 30) == 3) 60 #endif 61 62 typedef CONST char *PCSZ; 63 64 typedef struct _STRING 65 { 66 USHORT Length; 67 USHORT MaximumLength; 68 PCHAR Buffer; 69 } STRING, *PSTRING; 70 typedef STRING ANSI_STRING; 71 typedef PSTRING PANSI_STRING; 72 typedef PSTRING PCANSI_STRING; // yes, thats the definition from MS! 73 typedef STRING OEM_STRING; 74 typedef PSTRING POEM_STRING; 75 typedef const STRING *PCOEM_STRING; 76 77 typedef struct _UNICODE_STRING 78 { 79 USHORT Length; 80 USHORT MaximumLength; 81 PWSTR Buffer; 82 } UNICODE_STRING, *PUNICODE_STRING; 83 typedef const UNICODE_STRING *PCUNICODE_STRING; 84 85 typedef struct _RTL_USER_PROCESS_PARAMETERS 86 { 87 BYTE Reserved1[16]; 88 PVOID Reserved2[10]; 89 UNICODE_STRING ImagePathName; 90 UNICODE_STRING CommandLine; 91 } RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS; 92 93 typedef struct _PEB_LDR_DATA 94 { 95 BYTE Reserved1[8]; 96 PVOID Reserved2[3]; 97 LIST_ENTRY InMemoryOrderModuleList; 98 } PEB_LDR_DATA, *PPEB_LDR_DATA; 99 100 typedef struct _LDR_DATA_TABLE_ENTRY 101 { 102 PVOID Reserved1[2]; 103 LIST_ENTRY InMemoryOrderLinks; 104 PVOID Reserved2[2]; 105 PVOID DllBase; 106 PVOID Reserved3[2]; 107 UNICODE_STRING FullDllName; 108 BYTE Reserved4[8]; 109 PVOID Reserved5[3]; 110 union { 111 ULONG CheckSum; 112 PVOID Reserved6; 113 } DUMMYUNIONNAME; 114 ULONG TimeDateStamp; 115 } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY; 116 117 typedef 118 VOID 119 (NTAPI *PPS_POST_PROCESS_INIT_ROUTINE)( 120 VOID); 121 122 typedef struct _PEB 123 { 124 BYTE Reserved1[2]; 125 BYTE BeingDebugged; 126 BYTE Reserved2[1]; 127 PVOID Reserved3[2]; 128 PPEB_LDR_DATA Ldr; 129 PRTL_USER_PROCESS_PARAMETERS ProcessParameters; 130 PVOID Reserved4[3]; 131 PVOID AtlThunkSListPtr; 132 PVOID Reserved5; 133 ULONG Reserved6; 134 PVOID Reserved7; 135 ULONG Reserved8; 136 ULONG AtlThunkSListPtr32; 137 PVOID Reserved9[45]; 138 BYTE Reserved10[96]; 139 PPS_POST_PROCESS_INIT_ROUTINE PostProcessInitRoutine; 140 BYTE Reserved11[128]; 141 PVOID Reserved12[1]; 142 ULONG SessionId; 143 } PEB, *PPEB; 144 145 typedef struct _TEB 146 { 147 PVOID Reserved1[12]; 148 PPEB ProcessEnvironmentBlock; 149 PVOID Reserved2[399]; 150 BYTE Reserved3[1952]; 151 PVOID TlsSlots[64]; 152 BYTE Reserved4[8]; 153 PVOID Reserved5[26]; 154 PVOID ReservedForOle; 155 PVOID Reserved6[4]; 156 PVOID TlsExpansionSlots; 157 } TEB, *PTEB; 158 159 typedef enum _FILE_INFORMATION_CLASS 160 { 161 FileDirectoryInformation = 1 162 } FILE_INFORMATION_CLASS; 163 164 #define INTERNAL_TS_ACTIVE_CONSOLE_ID (*((volatile ULONG*)0x7ffe02d8)) 165 #define LOGONID_CURRENT ((ULONG)-1) 166 #define SERVERNAME_CURRENT ((HANDLE)NULL) 167 168 /* Flags for NtCreateFile and NtOpenFile */ 169 #define FILE_DIRECTORY_FILE 0x00000001 170 #define FILE_WRITE_THROUGH 0x00000002 171 #define FILE_SEQUENTIAL_ONLY 0x00000004 172 #define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008 173 #define FILE_SYNCHRONOUS_IO_ALERT 0x00000010 174 #define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020 175 #define FILE_NON_DIRECTORY_FILE 0x00000040 176 #define FILE_CREATE_TREE_CONNECTION 0x00000080 177 #define FILE_COMPLETE_IF_OPLOCKED 0x00000100 178 #define FILE_NO_EA_KNOWLEDGE 0x00000200 179 #define FILE_OPEN_REMOTE_INSTANCE 0x00000400 180 #define FILE_RANDOM_ACCESS 0x00000800 181 #define FILE_DELETE_ON_CLOSE 0x00001000 182 #define FILE_OPEN_BY_FILE_ID 0x00002000 183 #define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000 184 #define FILE_NO_COMPRESSION 0x00008000 185 #if (_WIN32_WINNT >= _WIN32_WINNT_WIN7) 186 #define FILE_OPEN_REQUIRING_OPLOCK 0x00010000 187 #endif 188 #define FILE_RESERVE_OPFILTER 0x00100000 189 #define FILE_OPEN_REPARSE_POINT 0x00200000 190 #define FILE_OPEN_NO_RECALL 0x00400000 191 #define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000 192 193 /* Status for NtCreateFile or NtOpenFile */ 194 #define FILE_SUPERSEDED 0x00000000 195 #define FILE_OPENED 0x00000001 196 #define FILE_CREATED 0x00000002 197 #define FILE_OVERWRITTEN 0x00000003 198 #define FILE_EXISTS 0x00000004 199 #define FILE_DOES_NOT_EXIST 0x00000005 200 201 #define FILE_VALID_OPTION_FLAGS 0x00ffffff 202 #define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032 203 #define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032 204 #define FILE_VALID_SET_FLAGS 0x00000036 205 206 /* Disposition for NtCreateFile */ 207 #define FILE_SUPERSEDE 0x00000000 208 #define FILE_OPEN 0x00000001 209 #define FILE_CREATE 0x00000002 210 #define FILE_OPEN_IF 0x00000003 211 #define FILE_OVERWRITE 0x00000004 212 #define FILE_OVERWRITE_IF 0x00000005 213 #define FILE_MAXIMUM_DISPOSITION 0x00000005 214 215 typedef struct _OBJECT_ATTRIBUTES 216 { 217 ULONG Length; 218 HANDLE RootDirectory; 219 PUNICODE_STRING ObjectName; 220 ULONG Attributes; 221 PVOID SecurityDescriptor; 222 PVOID SecurityQualityOfService; 223 } OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; 224 225 #define OBJ_INHERIT 0x00000002L 226 #define OBJ_PERMANENT 0x00000010L 227 #define OBJ_EXCLUSIVE 0x00000020L 228 #define OBJ_CASE_INSENSITIVE 0x00000040L 229 #define OBJ_OPENIF 0x00000080L 230 #define OBJ_OPENLINK 0x00000100L 231 #define OBJ_KERNEL_HANDLE 0x00000200L 232 #define OBJ_FORCE_ACCESS_CHECK 0x00000400L 233 #define OBJ_VALID_ATTRIBUTES 0x000007F2L 234 235 #ifndef InitializeObjectAttributes 236 #define InitializeObjectAttributes(p, n, a, r, s) \ 237 { \ 238 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ 239 (p)->RootDirectory = r; \ 240 (p)->Attributes = a; \ 241 (p)->ObjectName = n; \ 242 (p)->SecurityDescriptor = s; \ 243 (p)->SecurityQualityOfService = NULL; \ 244 } 245 #endif 246 247 typedef struct _IO_STATUS_BLOCK { 248 union { 249 NTSTATUS Status; 250 PVOID Pointer; 251 } DUMMYUNIONNAME; 252 253 ULONG_PTR Information; 254 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; 255 256 __kernel_entry 257 NTSYSCALLAPI 258 NTSTATUS 259 NTAPI 260 NtCreateFile( 261 _Out_ PHANDLE FileHandle, 262 _In_ ACCESS_MASK DesiredAccess, 263 _In_ POBJECT_ATTRIBUTES ObjectAttributes, 264 _Out_ PIO_STATUS_BLOCK IoStatusBlock, 265 _In_opt_ PLARGE_INTEGER AllocationSize, 266 _In_ ULONG FileAttributes, 267 _In_ ULONG ShareAccess, 268 _In_ ULONG CreateDisposition, 269 _In_ ULONG CreateOptions, 270 _In_reads_bytes_opt_(EaLength) PVOID EaBuffer, 271 _In_ ULONG EaLength); 272 273 __kernel_entry 274 NTSYSCALLAPI 275 NTSTATUS 276 NTAPI 277 NtOpenFile( 278 _Out_ PHANDLE FileHandle, 279 _In_ ACCESS_MASK DesiredAccess, 280 _In_ POBJECT_ATTRIBUTES ObjectAttributes, 281 _Out_ PIO_STATUS_BLOCK IoStatusBlock, 282 _In_ ULONG ShareAccess, 283 _In_ ULONG OpenOptions); 284 285 __kernel_entry 286 NTSYSCALLAPI 287 NTSTATUS 288 NTAPI 289 NtClose( 290 _In_ HANDLE Handle); 291 292 typedef 293 VOID 294 (NTAPI *PIO_APC_ROUTINE)( 295 _In_ PVOID ApcContext, 296 _In_ PIO_STATUS_BLOCK IoStatusBlock, 297 _In_ ULONG Reserved); 298 299 __kernel_entry 300 NTSYSCALLAPI 301 NTSTATUS 302 NTAPI 303 NtDeviceIoControlFile( 304 _In_ HANDLE FileHandle, 305 _In_opt_ HANDLE Event, 306 _In_opt_ PIO_APC_ROUTINE ApcRoutine, 307 _In_opt_ PVOID ApcContext, 308 _Out_ PIO_STATUS_BLOCK IoStatusBlock, 309 _In_ ULONG IoControlCode, 310 _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, 311 _In_ ULONG InputBufferLength, 312 _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer, 313 _In_ ULONG OutputBufferLength); 314 315 __kernel_entry 316 NTSYSCALLAPI 317 NTSTATUS 318 NTAPI 319 NtWaitForSingleObject( 320 _In_ HANDLE Object, 321 _In_ BOOLEAN Alertable, 322 _In_opt_ PLARGE_INTEGER Timeout); 323 324 __kernel_entry 325 NTSYSCALLAPI 326 NTSTATUS 327 NTAPI 328 NtRenameKey( 329 _In_ HANDLE KeyHandle, 330 _In_ PUNICODE_STRING NewName); 331 332 __kernel_entry 333 NTSYSCALLAPI 334 NTSTATUS 335 NTAPI 336 NtNotifyChangeMultipleKeys( 337 _In_ HANDLE MasterKeyHandle, 338 _In_opt_ ULONG Count, 339 _In_reads_opt_(Count) OBJECT_ATTRIBUTES SubordinateObjects[], 340 _In_opt_ HANDLE Event, 341 _In_opt_ PIO_APC_ROUTINE ApcRoutine, 342 _In_opt_ PVOID ApcContext, 343 _Out_ PIO_STATUS_BLOCK IoStatusBlock, 344 _In_ ULONG CompletionFilter, 345 _In_ BOOLEAN WatchTree, 346 _Out_writes_bytes_opt_(BufferSize) PVOID Buffer, 347 _In_ ULONG BufferSize, 348 _In_ BOOLEAN Asynchronous); 349 350 typedef struct _KEY_VALUE_ENTRY 351 { 352 PUNICODE_STRING ValueName; 353 ULONG DataLength; 354 ULONG DataOffset; 355 ULONG Type; 356 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY; 357 358 __kernel_entry 359 NTSYSCALLAPI 360 NTSTATUS 361 NTAPI 362 NtQueryMultipleValueKey( 363 _In_ HANDLE KeyHandle, 364 _Inout_updates_(EntryCount) PKEY_VALUE_ENTRY ValueEntries, 365 _In_ ULONG EntryCount, 366 _Out_writes_bytes_(*BufferLength) PVOID ValueBuffer, 367 _Inout_ PULONG BufferLength, 368 _Out_opt_ PULONG RequiredBufferLength); 369 370 typedef enum _KEY_SET_INFORMATION_CLASS 371 { 372 KeyWriteTimeInformation, 373 KeyWow64FlagsInformation, 374 KeyControlFlagsInformation, 375 KeySetVirtualizationInformation, 376 KeySetDebugInformation, 377 KeySetHandleTagsInformation, 378 MaxKeySetInfoClass 379 } KEY_SET_INFORMATION_CLASS; 380 381 __kernel_entry 382 NTSYSCALLAPI 383 NTSTATUS 384 NTAPI 385 NtSetInformationKey( 386 _In_ HANDLE KeyHandle, 387 _In_ _Strict_type_match_ 388 KEY_SET_INFORMATION_CLASS KeySetInformationClass, 389 _In_reads_bytes_(KeySetInformationLength) PVOID KeySetInformation, 390 _In_ ULONG KeySetInformationLength); 391 392 typedef enum _PROCESSINFOCLASS 393 { 394 ProcessBasicInformation = 0, 395 ProcessDebugPort = 7, 396 ProcessWow64Information = 26, 397 ProcessImageFileName = 27, 398 ProcessBreakOnTermination = 29 399 } PROCESSINFOCLASS; 400 401 typedef struct _PROCESS_BASIC_INFORMATION 402 { 403 PVOID Reserved1; 404 PPEB PebBaseAddress; 405 PVOID Reserved2[2]; 406 ULONG_PTR UniqueProcessId; 407 PVOID Reserved3; 408 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION; 409 410 __kernel_entry 411 NTSYSCALLAPI 412 NTSTATUS 413 NTAPI 414 NtQueryInformationProcess( 415 _In_ HANDLE ProcessHandle, 416 _In_ PROCESSINFOCLASS ProcessInformationClass, 417 _Out_ PVOID ProcessInformation, 418 _In_ ULONG ProcessInformationLength, 419 _Out_opt_ PULONG ReturnLength); 420 421 typedef enum _THREADINFOCLASS 422 { 423 ThreadIsIoPending = 16 424 } THREADINFOCLASS; 425 426 __kernel_entry 427 NTSYSCALLAPI 428 NTSTATUS 429 NTAPI 430 NtQueryInformationThread( 431 _In_ HANDLE ThreadHandle, 432 _In_ THREADINFOCLASS ThreadInformationClass, 433 _Out_ PVOID ThreadInformation, 434 _In_ ULONG ThreadInformationLength, 435 _Out_opt_ PULONG ReturnLength); 436 437 typedef enum _OBJECT_INFORMATION_CLASS 438 { 439 ObjectBasicInformation = 0, 440 ObjectTypeInformation = 2 441 } OBJECT_INFORMATION_CLASS; 442 443 typedef struct _PUBLIC_OBJECT_BASIC_INFORMATION 444 { 445 ULONG Attributes; 446 ACCESS_MASK GrantedAccess; 447 ULONG HandleCount; 448 ULONG PointerCount; 449 ULONG Reserved[10]; 450 } PUBLIC_OBJECT_BASIC_INFORMATION, *PPUBLIC_OBJECT_BASIC_INFORMATION; 451 452 typedef struct __PUBLIC_OBJECT_TYPE_INFORMATION 453 { 454 UNICODE_STRING TypeName; 455 ULONG Reserved [22]; 456 } PUBLIC_OBJECT_TYPE_INFORMATION, *PPUBLIC_OBJECT_TYPE_INFORMATION; 457 458 _IRQL_requires_max_(PASSIVE_LEVEL) 459 __kernel_entry 460 NTSYSCALLAPI 461 NTSTATUS 462 NTAPI 463 NtQueryObject( 464 _In_opt_ HANDLE Handle, 465 _In_ OBJECT_INFORMATION_CLASS ObjectInformationClass, 466 _Out_writes_bytes_opt_(ObjectInformationLength) PVOID ObjectInformation, 467 _In_ ULONG ObjectInformationLength, 468 _Out_opt_ PULONG ReturnLength); 469 470 typedef enum _SYSTEM_INFORMATION_CLASS 471 { 472 SystemBasicInformation = 0, 473 SystemPerformanceInformation = 2, 474 SystemTimeOfDayInformation = 3, 475 SystemProcessInformation = 5, 476 SystemProcessorPerformanceInformation = 8, 477 SystemInterruptInformation = 23, 478 SystemExceptionInformation = 33, 479 SystemRegistryQuotaInformation = 37, 480 SystemLookasideInformation = 45, 481 SystemPolicyInformation = 134, 482 } SYSTEM_INFORMATION_CLASS; 483 484 typedef struct _SYSTEM_BASIC_INFORMATION 485 { 486 BYTE Reserved1[24]; 487 PVOID Reserved2[4]; 488 CCHAR NumberOfProcessors; 489 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION; 490 491 typedef struct _SYSTEM_PERFORMANCE_INFORMATION 492 { 493 BYTE Reserved1[312]; 494 } SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION; 495 496 typedef struct _SYSTEM_TIMEOFDAY_INFORMATION 497 { 498 BYTE Reserved1[48]; 499 } SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION; 500 501 typedef struct _SYSTEM_PROCESS_INFORMATION 502 { 503 ULONG NextEntryOffset; 504 BYTE Reserved1[52]; 505 PVOID Reserved2[3]; 506 HANDLE UniqueProcessId; 507 PVOID Reserved3; 508 ULONG HandleCount; 509 BYTE Reserved4[4]; 510 PVOID Reserved5[11]; 511 SIZE_T PeakPagefileUsage; 512 SIZE_T PrivatePageCount; 513 LARGE_INTEGER Reserved6[6]; 514 } SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION; 515 516 typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION 517 { 518 LARGE_INTEGER IdleTime; 519 LARGE_INTEGER KernelTime; 520 LARGE_INTEGER UserTime; 521 LARGE_INTEGER Reserved1[2]; 522 ULONG Reserved2; 523 } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION; 524 525 typedef struct _SYSTEM_INTERRUPT_INFORMATION 526 { 527 BYTE Reserved1[24]; 528 } SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION; 529 530 typedef struct _SYSTEM_EXCEPTION_INFORMATION 531 { 532 BYTE Reserved1[16]; 533 } SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION; 534 535 typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION 536 { 537 ULONG RegistryQuotaAllowed; 538 ULONG RegistryQuotaUsed; 539 PVOID Reserved1; 540 } SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION; 541 542 typedef struct _SYSTEM_LOOKASIDE_INFORMATION 543 { 544 BYTE Reserved1[32]; 545 } SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION; 546 547 typedef struct _SYSTEM_POLICY_INFORMATION 548 { 549 PVOID Reserved1[2]; 550 ULONG Reserved2[3]; 551 } SYSTEM_POLICY_INFORMATION, *PSYSTEM_POLICY_INFORMATION; 552 553 __kernel_entry 554 NTSYSCALLAPI 555 NTSTATUS 556 NTAPI 557 NtQuerySystemInformation( 558 _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass, 559 _Out_ PVOID SystemInformation, 560 _In_ ULONG InformationLength, 561 _Out_opt_ PULONG ResultLength); 562 563 typedef enum _WINSTATIONINFOCLASS 564 { 565 WinStationInformation = 8 566 } WINSTATIONINFOCLASS; 567 568 typedef struct _WINSTATIONINFORMATIONW 569 { 570 BYTE Reserved2[70]; 571 ULONG LogonId; 572 BYTE Reserved3[1140]; 573 } WINSTATIONINFORMATIONW, * PWINSTATIONINFORMATIONW; 574 575 typedef 576 BOOLEAN 577 (WINAPI * PWINSTATIONQUERYINFORMATIONW)( 578 HANDLE, 579 ULONG, 580 WINSTATIONINFOCLASS, 581 PVOID, 582 ULONG, 583 PULONG); 584 585 __kernel_entry 586 NTSYSCALLAPI 587 NTSTATUS 588 NTAPI 589 NtQuerySystemTime( 590 _Out_ PLARGE_INTEGER SystemTime); 591 592 #define RtlMoveMemory(Dest,Source,Length) memmove((Dest),(Source),(Length)) 593 #define RtlFillMemory(Dest,Length,Fill) memset((Dest),(Fill),(Length)) 594 #define RtlZeroMemory(Dest,Length) RtlFillMemory((Dest),(Length),0) 595 596 VOID 597 NTAPI 598 RtlInitString( 599 PSTRING DestinationString, 600 PCSZ SourceString); 601 602 VOID 603 NTAPI 604 RtlInitAnsiString( 605 PANSI_STRING DestinationString, 606 PCSZ SourceString); 607 608 VOID 609 NTAPI 610 RtlInitUnicodeString( 611 PUNICODE_STRING DestinationString, 612 PCWSTR SourceString); 613 614 VOID 615 NTAPI 616 RtlFreeAnsiString( 617 PANSI_STRING AnsiString); 618 619 VOID 620 NTAPI 621 RtlFreeOemString( 622 POEM_STRING OemString); 623 624 VOID 625 NTAPI 626 RtlFreeUnicodeString( 627 PUNICODE_STRING UnicodeString); 628 629 NTSTATUS 630 NTAPI 631 RtlAnsiStringToUnicodeString( 632 PUNICODE_STRING DestinationString, 633 PCANSI_STRING SourceString, 634 BOOLEAN AllocateDestinationString); 635 636 NTSTATUS 637 NTAPI 638 RtlUnicodeStringToAnsiString( 639 PANSI_STRING DestinationString, 640 PCUNICODE_STRING SourceString, 641 BOOLEAN AllocateDestinationString); 642 643 NTSTATUS 644 NTAPI 645 RtlUnicodeStringToOemString( 646 POEM_STRING DestinationString, 647 PCUNICODE_STRING SourceString, 648 BOOLEAN AllocateDestinationString); 649 650 NTSTATUS 651 NTAPI 652 RtlUnicodeToMultiByteSize( 653 _Out_ PULONG BytesInMultiByteString, 654 _In_reads_bytes_(BytesInUnicodeString) PWCH UnicodeString, 655 _In_ ULONG BytesInUnicodeString); 656 657 NTSTATUS 658 NTAPI 659 RtlCharToInteger( 660 PCSZ String, 661 ULONG Base, 662 PULONG Value); 663 664 BOOLEAN 665 NTAPI 666 RtlIsNameLegalDOS8Dot3( 667 _In_ PUNICODE_STRING Name, 668 _Inout_opt_ POEM_STRING OemName, 669 _Inout_opt_ PBOOLEAN NameContainsSpaces); 670 671 NTSTATUS 672 NTAPI 673 RtlLocalTimeToSystemTime( 674 IN PLARGE_INTEGER LocalTime, 675 _Out_ PLARGE_INTEGER SystemTime); 676 677 BOOLEAN 678 NTAPI 679 RtlTimeToSecondsSince1970( 680 PLARGE_INTEGER Time, 681 PULONG ElapsedSeconds); 682 683 _When_(Status < 0, _Out_range_(>, 0)) 684 _When_(Status >= 0, _Out_range_(==, 0)) 685 ULONG 686 NTAPI 687 RtlNtStatusToDosError( 688 _In_ NTSTATUS Status); 689 690 NTSTATUS 691 NTAPI 692 RtlConvertSidToUnicodeString( 693 PUNICODE_STRING UnicodeString, 694 PSID Sid, 695 BOOLEAN AllocateDestinationString); 696 697 ULONG 698 NTAPI 699 RtlUniform( 700 PULONG Seed); 701 702 703 #ifdef __cplusplus 704 } 705 #endif 706 707 #endif /* _WINTERNL_ */ 708