1 /*++ NDK Version: 0098 2 3 Copyright (c) Alex Ionescu. All rights reserved. 4 5 Header Name: 6 7 exfuncs.h 8 9 Abstract: 10 11 Function definitions for the Executive. 12 13 Author: 14 15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006 16 17 --*/ 18 19 #ifndef _EXFUNCS_H 20 #define _EXFUNCS_H 21 22 // 23 // Dependencies 24 // 25 #include <umtypes.h> 26 #include <pstypes.h> 27 #include <extypes.h> 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 // 34 // Don't include WMI headers just for one define 35 // 36 #ifndef PEVENT_TRACE_HEADER_DEFINED 37 #define PEVENT_TRACE_HEADER_DEFINED 38 typedef struct _EVENT_TRACE_HEADER *PEVENT_TRACE_HEADER; 39 #endif 40 41 #ifndef NTOS_MODE_USER 42 // 43 // Fast Mutex functions 44 // 45 VOID 46 FASTCALL 47 ExEnterCriticalRegionAndAcquireFastMutexUnsafe( 48 _Inout_ PFAST_MUTEX FastMutex 49 ); 50 51 VOID 52 FASTCALL 53 ExReleaseFastMutexUnsafeAndLeaveCriticalRegion( 54 _Inout_ PFAST_MUTEX FastMutex 55 ); 56 57 // 58 // Pushlock functions 59 // 60 VOID 61 FASTCALL 62 ExfAcquirePushLockExclusive( 63 _Inout_ PEX_PUSH_LOCK PushLock 64 ); 65 66 VOID 67 FASTCALL 68 ExfAcquirePushLockShared( 69 _Inout_ PEX_PUSH_LOCK PushLock 70 ); 71 72 VOID 73 FASTCALL 74 ExfReleasePushLock( 75 _Inout_ PEX_PUSH_LOCK PushLock 76 ); 77 78 VOID 79 FASTCALL 80 ExfReleasePushLockExclusive( 81 _Inout_ PEX_PUSH_LOCK PushLock 82 ); 83 84 VOID 85 FASTCALL 86 ExfReleasePushLockShared( 87 _Inout_ PEX_PUSH_LOCK PushLock 88 ); 89 90 VOID 91 FASTCALL 92 ExfTryToWakePushLock( 93 _Inout_ PEX_PUSH_LOCK PushLock 94 ); 95 96 VOID 97 FASTCALL 98 ExfUnblockPushLock( 99 _Inout_ PEX_PUSH_LOCK PushLock, 100 _Inout_ PVOID CurrentWaitBlock 101 ); 102 103 // 104 // Handle Table Functions 105 // 106 NTKERNELAPI 107 BOOLEAN 108 NTAPI 109 ExEnumHandleTable( 110 _In_ PHANDLE_TABLE HandleTable, 111 _In_ PEX_ENUM_HANDLE_CALLBACK EnumHandleProcedure, 112 _Inout_ PVOID Context, 113 _Out_opt_ PHANDLE Handle 114 ); 115 116 // 117 // HardError Functions 118 // 119 NTSTATUS 120 NTAPI 121 ExRaiseHardError( 122 _In_ NTSTATUS ErrorStatus, 123 _In_ ULONG NumberOfParameters, 124 _In_ ULONG UnicodeStringParameterMask, 125 _In_ PULONG_PTR Parameters, 126 _In_ ULONG ValidResponseOptions, 127 _Out_ PULONG Response 128 ); 129 130 #endif 131 132 // 133 // Native Calls 134 // 135 NTSYSCALLAPI 136 NTSTATUS 137 NTAPI 138 NtAddAtom( 139 _In_ PWSTR AtomName, 140 _In_ ULONG AtomNameLength, 141 _Inout_ PRTL_ATOM Atom 142 ); 143 144 NTSYSCALLAPI 145 NTSTATUS 146 NTAPI 147 NtCancelTimer( 148 _In_ HANDLE TimerHandle, 149 _Out_opt_ PBOOLEAN CurrentState 150 ); 151 152 NTSYSCALLAPI 153 NTSTATUS 154 NTAPI 155 NtClearEvent( 156 _In_ HANDLE EventHandle 157 ); 158 159 _IRQL_requires_max_(PASSIVE_LEVEL) 160 NTSYSCALLAPI 161 NTSTATUS 162 NTAPI 163 NtCreateEvent( 164 _Out_ PHANDLE EventHandle, 165 _In_ ACCESS_MASK DesiredAccess, 166 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 167 _In_ EVENT_TYPE EventType, 168 _In_ BOOLEAN InitialState 169 ); 170 171 NTSYSCALLAPI 172 NTSTATUS 173 NTAPI 174 NtCreateEventPair( 175 _Out_ PHANDLE EventPairHandle, 176 _In_ ACCESS_MASK DesiredAccess, 177 _In_ POBJECT_ATTRIBUTES ObjectAttributes 178 ); 179 180 _IRQL_requires_max_(PASSIVE_LEVEL) 181 NTSYSCALLAPI 182 NTSTATUS 183 NTAPI 184 NtCreateKeyedEvent( 185 _Out_ PHANDLE OutHandle, 186 _In_ ACCESS_MASK AccessMask, 187 _In_ POBJECT_ATTRIBUTES ObjectAttributes, 188 _In_ ULONG Flags 189 ); 190 191 NTSYSCALLAPI 192 NTSTATUS 193 NTAPI 194 NtCreateMutant( 195 _Out_ PHANDLE MutantHandle, 196 _In_ ACCESS_MASK DesiredAccess, 197 _In_ POBJECT_ATTRIBUTES ObjectAttributes, 198 _In_ BOOLEAN InitialOwner 199 ); 200 201 NTSYSCALLAPI 202 NTSTATUS 203 NTAPI 204 NtCreateSemaphore( 205 _Out_ PHANDLE SemaphoreHandle, 206 _In_ ACCESS_MASK DesiredAccess, 207 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 208 _In_ LONG InitialCount, 209 _In_ LONG MaximumCount 210 ); 211 212 NTSYSCALLAPI 213 NTSTATUS 214 NTAPI 215 NtCreateTimer( 216 _Out_ PHANDLE TimerHandle, 217 _In_ ACCESS_MASK DesiredAccess, 218 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 219 _In_ TIMER_TYPE TimerType 220 ); 221 222 NTSYSCALLAPI 223 NTSTATUS 224 NTAPI 225 NtDeleteAtom( 226 _In_ RTL_ATOM Atom 227 ); 228 229 NTSYSCALLAPI 230 NTSTATUS 231 NTAPI 232 NtDisplayString( 233 _In_ PUNICODE_STRING DisplayString 234 ); 235 236 NTSYSCALLAPI 237 NTSTATUS 238 NTAPI 239 NtEnumerateSystemEnvironmentValuesEx( 240 _In_ ULONG InformationClass, 241 _In_ PVOID Buffer, 242 _In_ ULONG BufferLength 243 ); 244 245 NTSYSCALLAPI 246 NTSTATUS 247 NTAPI 248 NtFindAtom( 249 _In_ PWSTR AtomName, 250 _In_ ULONG AtomNameLength, 251 _Out_opt_ PRTL_ATOM Atom 252 ); 253 254 NTSYSCALLAPI 255 NTSTATUS 256 NTAPI 257 NtOpenEvent( 258 _Out_ PHANDLE EventHandle, 259 _In_ ACCESS_MASK DesiredAccess, 260 _In_ POBJECT_ATTRIBUTES ObjectAttributes 261 ); 262 263 _IRQL_requires_max_(PASSIVE_LEVEL) 264 NTSYSCALLAPI 265 NTSTATUS 266 NTAPI 267 NtOpenKeyedEvent( 268 _Out_ PHANDLE OutHandle, 269 _In_ ACCESS_MASK AccessMask, 270 _In_ POBJECT_ATTRIBUTES ObjectAttributes 271 ); 272 273 NTSYSCALLAPI 274 NTSTATUS 275 NTAPI 276 NtOpenEventPair( 277 _Out_ PHANDLE EventPairHandle, 278 _In_ ACCESS_MASK DesiredAccess, 279 _In_ POBJECT_ATTRIBUTES ObjectAttributes 280 ); 281 282 NTSYSCALLAPI 283 NTSTATUS 284 NTAPI 285 NtOpenMutant( 286 _Out_ PHANDLE MutantHandle, 287 _In_ ACCESS_MASK DesiredAccess, 288 _In_ POBJECT_ATTRIBUTES ObjectAttributes 289 ); 290 291 NTSYSCALLAPI 292 NTSTATUS 293 NTAPI 294 NtOpenSemaphore( 295 _Out_ PHANDLE SemaphoreHandle, 296 _In_ ACCESS_MASK DesiredAcces, 297 _In_ POBJECT_ATTRIBUTES ObjectAttributes 298 ); 299 300 NTSYSCALLAPI 301 NTSTATUS 302 NTAPI 303 NtOpenTimer( 304 _Out_ PHANDLE TimerHandle, 305 _In_ ACCESS_MASK DesiredAccess, 306 _In_ POBJECT_ATTRIBUTES ObjectAttributes 307 ); 308 309 NTSYSCALLAPI 310 NTSTATUS 311 NTAPI 312 NtPulseEvent( 313 _In_ HANDLE EventHandle, 314 _In_opt_ PLONG PulseCount 315 ); 316 317 NTSYSCALLAPI 318 NTSTATUS 319 NTAPI 320 NtQueryDefaultLocale( 321 _In_ BOOLEAN UserProfile, 322 _Out_ PLCID DefaultLocaleId 323 ); 324 325 NTSYSCALLAPI 326 NTSTATUS 327 NTAPI 328 NtQueryDefaultUILanguage( 329 LANGID* LanguageId 330 ); 331 332 NTSYSCALLAPI 333 NTSTATUS 334 NTAPI 335 NtQueryEvent( 336 _In_ HANDLE EventHandle, 337 _In_ EVENT_INFORMATION_CLASS EventInformationClass, 338 _Out_ PVOID EventInformation, 339 _In_ ULONG EventInformationLength, 340 _Out_ PULONG ReturnLength 341 ); 342 343 NTSYSCALLAPI 344 NTSTATUS 345 NTAPI 346 NtQueryInformationAtom( 347 _In_ RTL_ATOM Atom, 348 _In_ ATOM_INFORMATION_CLASS AtomInformationClass, 349 _Out_ PVOID AtomInformation, 350 _In_ ULONG AtomInformationLength, 351 _Out_opt_ PULONG ReturnLength 352 ); 353 354 NTSYSCALLAPI 355 NTSTATUS 356 NTAPI 357 NtQueryInstallUILanguage( 358 LANGID* LanguageId 359 ); 360 361 NTSYSCALLAPI 362 NTSTATUS 363 NTAPI 364 NtQueryMutant( 365 _In_ HANDLE MutantHandle, 366 _In_ MUTANT_INFORMATION_CLASS MutantInformationClass, 367 _Out_ PVOID MutantInformation, 368 _In_ ULONG Length, 369 _Out_ PULONG ResultLength 370 ); 371 372 NTSYSCALLAPI 373 NTSTATUS 374 NTAPI 375 NtQuerySemaphore( 376 _In_ HANDLE SemaphoreHandle, 377 _In_ SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass, 378 _Out_ PVOID SemaphoreInformation, 379 _In_ ULONG Length, 380 _Out_ PULONG ReturnLength 381 ); 382 383 NTSYSCALLAPI 384 NTSTATUS 385 NTAPI 386 NtQuerySystemEnvironmentValue( 387 _In_ PUNICODE_STRING Name, 388 _Out_ PWSTR Value, 389 ULONG Length, 390 PULONG ReturnLength 391 ); 392 393 NTSYSCALLAPI 394 NTSTATUS 395 NTAPI 396 NtQuerySystemEnvironmentValueEx( 397 _In_ PUNICODE_STRING VariableName, 398 _In_ LPGUID VendorGuid, 399 _Out_opt_ PVOID Value, 400 _Inout_ PULONG ReturnLength, 401 _Out_opt_ PULONG Attributes 402 ); 403 404 __kernel_entry 405 NTSYSCALLAPI 406 NTSTATUS 407 NTAPI 408 NtQuerySystemInformation( 409 _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass, 410 _Out_writes_bytes_to_opt_(SystemInformationLength, *ReturnLength) PVOID SystemInformation, 411 _In_ ULONG SystemInformationLength, 412 _Out_opt_ PULONG ReturnLength 413 ); 414 415 NTSYSCALLAPI 416 NTSTATUS 417 NTAPI 418 NtQueryTimer( 419 _In_ HANDLE TimerHandle, 420 _In_ TIMER_INFORMATION_CLASS TimerInformationClass, 421 _Out_ PVOID TimerInformation, 422 _In_ ULONG Length, 423 _Out_ PULONG ResultLength 424 ); 425 426 NTSYSCALLAPI 427 NTSTATUS 428 NTAPI 429 NtRaiseHardError( 430 _In_ NTSTATUS ErrorStatus, 431 _In_ ULONG NumberOfParameters, 432 _In_ ULONG UnicodeStringParameterMask, 433 _In_ PULONG_PTR Parameters, 434 _In_ ULONG ValidResponseOptions, 435 _Out_ PULONG Response 436 ); 437 438 NTSYSCALLAPI 439 NTSTATUS 440 NTAPI 441 NtReleaseMutant( 442 _In_ HANDLE MutantHandle, 443 _In_opt_ PLONG ReleaseCount 444 ); 445 446 _IRQL_requires_max_(PASSIVE_LEVEL) 447 NTSYSCALLAPI 448 NTSTATUS 449 NTAPI 450 NtReleaseKeyedEvent( 451 _In_opt_ HANDLE EventHandle, 452 _In_ PVOID Key, 453 _In_ BOOLEAN Alertable, 454 _In_opt_ PLARGE_INTEGER Timeout 455 ); 456 457 NTSYSCALLAPI 458 NTSTATUS 459 NTAPI 460 NtReleaseSemaphore( 461 _In_ HANDLE SemaphoreHandle, 462 _In_ LONG ReleaseCount, 463 _Out_opt_ PLONG PreviousCount 464 ); 465 466 NTSYSCALLAPI 467 NTSTATUS 468 NTAPI 469 NtResetEvent( 470 _In_ HANDLE EventHandle, 471 _Out_opt_ PLONG NumberOfWaitingThreads 472 ); 473 474 NTSYSCALLAPI 475 NTSTATUS 476 NTAPI 477 NtSetDefaultLocale( 478 _In_ BOOLEAN UserProfile, 479 _In_ LCID DefaultLocaleId 480 ); 481 482 NTSYSCALLAPI 483 NTSTATUS 484 NTAPI 485 NtSetDefaultUILanguage( 486 LANGID LanguageId 487 ); 488 489 NTSYSCALLAPI 490 NTSTATUS 491 NTAPI 492 NtSetDefaultHardErrorPort( 493 _In_ HANDLE PortHandle 494 ); 495 496 NTSYSCALLAPI 497 NTSTATUS 498 NTAPI 499 NtSetEvent( 500 _In_ HANDLE EventHandle, 501 _Out_opt_ PLONG PreviousState 502 ); 503 504 NTSYSCALLAPI 505 NTSTATUS 506 NTAPI 507 NtSetEventBoostPriority( 508 _In_ HANDLE EventHandle 509 ); 510 511 NTSYSCALLAPI 512 NTSTATUS 513 NTAPI 514 NtSetHighEventPair( 515 _In_ HANDLE EventPairHandle 516 ); 517 518 NTSYSCALLAPI 519 NTSTATUS 520 NTAPI 521 NtSetHighWaitLowEventPair( 522 _In_ HANDLE EventPairHandle 523 ); 524 525 NTSYSCALLAPI 526 NTSTATUS 527 NTAPI 528 NtSetLowEventPair( 529 _In_ HANDLE EventPair 530 ); 531 532 NTSYSCALLAPI 533 NTSTATUS 534 NTAPI 535 NtSetLowWaitHighEventPair( 536 _In_ HANDLE EventPair 537 ); 538 539 NTSYSCALLAPI 540 NTSTATUS 541 NTAPI 542 NtSetSystemEnvironmentValue( 543 _In_ PUNICODE_STRING VariableName, 544 _In_ PUNICODE_STRING Value 545 ); 546 547 NTSYSCALLAPI 548 NTSTATUS 549 NTAPI 550 NtSetSystemEnvironmentValueEx( 551 _In_ PUNICODE_STRING VariableName, 552 _In_ LPGUID VendorGuid, 553 _In_reads_bytes_opt_(ValueLength) PVOID Value, 554 _In_ ULONG ValueLength, 555 _In_ ULONG Attributes 556 ); 557 558 __kernel_entry 559 NTSYSCALLAPI 560 NTSTATUS 561 NTAPI 562 NtSetSystemInformation( 563 _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass, 564 _In_reads_bytes_(SystemInformationLength) PVOID SystemInformation, 565 _In_ ULONG SystemInformationLength 566 ); 567 568 NTSYSCALLAPI 569 NTSTATUS 570 NTAPI 571 NtSetTimer( 572 _In_ HANDLE TimerHandle, 573 _In_ PLARGE_INTEGER DueTime, 574 _In_ PTIMER_APC_ROUTINE TimerApcRoutine, 575 _In_ PVOID TimerContext, 576 _In_ BOOLEAN WakeTimer, 577 _In_opt_ LONG Period, 578 _Out_opt_ PBOOLEAN PreviousState 579 ); 580 581 NTSYSCALLAPI 582 NTSTATUS 583 NTAPI 584 NtSetUuidSeed( 585 _In_ PUCHAR UuidSeed 586 ); 587 588 NTSYSCALLAPI 589 NTSTATUS 590 NTAPI 591 NtShutdownSystem( 592 _In_ SHUTDOWN_ACTION Action 593 ); 594 595 _IRQL_requires_max_(PASSIVE_LEVEL) 596 NTSYSCALLAPI 597 NTSTATUS 598 NTAPI 599 NtWaitForKeyedEvent( 600 _In_opt_ HANDLE EventHandle, 601 _In_ PVOID Key, 602 _In_ BOOLEAN Alertable, 603 _In_opt_ PLARGE_INTEGER Timeout 604 ); 605 606 NTSYSCALLAPI 607 NTSTATUS 608 NTAPI 609 NtWaitHighEventPair( 610 _In_ HANDLE EventPairHandle 611 ); 612 613 NTSYSCALLAPI 614 NTSTATUS 615 NTAPI 616 NtWaitLowEventPair( 617 _In_ HANDLE EventPairHandle 618 ); 619 620 NTSYSCALLAPI 621 NTSTATUS 622 NTAPI 623 NtTraceEvent( 624 _In_ ULONG TraceHandle, 625 _In_ ULONG Flags, 626 _In_ ULONG TraceHeaderLength, 627 _In_ PEVENT_TRACE_HEADER TraceHeader 628 ); 629 630 NTSYSAPI 631 NTSTATUS 632 NTAPI 633 ZwAddAtom( 634 _In_ PWSTR AtomName, 635 _In_ ULONG AtomNameLength, 636 _Inout_ PRTL_ATOM Atom 637 ); 638 639 #ifdef NTOS_MODE_USER 640 NTSYSAPI 641 NTSTATUS 642 NTAPI 643 ZwCancelTimer( 644 _In_ HANDLE TimerHandle, 645 _Out_opt_ PBOOLEAN CurrentState 646 ); 647 #endif 648 649 NTSYSAPI 650 NTSTATUS 651 NTAPI 652 ZwClearEvent( 653 _In_ HANDLE EventHandle 654 ); 655 656 _IRQL_requires_max_(PASSIVE_LEVEL) 657 NTSYSAPI 658 NTSTATUS 659 NTAPI 660 ZwCreateEvent( 661 _Out_ PHANDLE EventHandle, 662 _In_ ACCESS_MASK DesiredAccess, 663 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 664 _In_ EVENT_TYPE EventType, 665 _In_ BOOLEAN InitialState 666 ); 667 668 NTSYSAPI 669 NTSTATUS 670 NTAPI 671 ZwCreateEventPair( 672 _Out_ PHANDLE EventPairHandle, 673 _In_ ACCESS_MASK DesiredAccess, 674 _In_ POBJECT_ATTRIBUTES ObjectAttributes 675 ); 676 677 _IRQL_requires_max_(PASSIVE_LEVEL) 678 NTSYSAPI 679 NTSTATUS 680 NTAPI 681 ZwCreateKeyedEvent( 682 _Out_ PHANDLE OutHandle, 683 _In_ ACCESS_MASK AccessMask, 684 _In_ POBJECT_ATTRIBUTES ObjectAttributes, 685 _In_ ULONG Flags 686 ); 687 688 NTSYSAPI 689 NTSTATUS 690 NTAPI 691 ZwCreateMutant( 692 _Out_ PHANDLE MutantHandle, 693 _In_ ACCESS_MASK DesiredAccess, 694 _In_ POBJECT_ATTRIBUTES ObjectAttributes, 695 _In_ BOOLEAN InitialOwner 696 ); 697 698 NTSYSAPI 699 NTSTATUS 700 NTAPI 701 ZwCreateSemaphore( 702 _Out_ PHANDLE SemaphoreHandle, 703 _In_ ACCESS_MASK DesiredAccess, 704 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 705 _In_ LONG InitialCount, 706 _In_ LONG MaximumCount 707 ); 708 709 #ifdef NTOS_MODE_USER 710 NTSYSAPI 711 NTSTATUS 712 NTAPI 713 ZwCreateTimer( 714 _Out_ PHANDLE TimerHandle, 715 _In_ ACCESS_MASK DesiredAccess, 716 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 717 _In_ TIMER_TYPE TimerType 718 ); 719 #endif 720 721 NTSYSAPI 722 NTSTATUS 723 NTAPI 724 ZwDeleteAtom( 725 _In_ RTL_ATOM Atom 726 ); 727 728 NTSYSAPI 729 NTSTATUS 730 NTAPI 731 ZwDisplayString( 732 _In_ PUNICODE_STRING DisplayString 733 ); 734 735 NTSYSAPI 736 NTSTATUS 737 NTAPI 738 ZwFindAtom( 739 _In_ PWSTR AtomName, 740 _In_ ULONG AtomNameLength, 741 _Out_opt_ PRTL_ATOM Atom 742 ); 743 744 NTSYSCALLAPI 745 NTSTATUS 746 NTAPI 747 ZwOpenEvent( 748 _Out_ PHANDLE EventHandle, 749 _In_ ACCESS_MASK DesiredAccess, 750 _In_ POBJECT_ATTRIBUTES ObjectAttributes 751 ); 752 753 NTSYSAPI 754 NTSTATUS 755 NTAPI 756 ZwOpenEventPair( 757 _Out_ PHANDLE EventPairHandle, 758 _In_ ACCESS_MASK DesiredAccess, 759 _In_ POBJECT_ATTRIBUTES ObjectAttributes 760 ); 761 762 NTSYSAPI 763 NTSTATUS 764 NTAPI 765 ZwOpenMutant( 766 _Out_ PHANDLE MutantHandle, 767 _In_ ACCESS_MASK DesiredAccess, 768 _In_ POBJECT_ATTRIBUTES ObjectAttributes 769 ); 770 771 NTSYSAPI 772 NTSTATUS 773 NTAPI 774 ZwOpenSemaphore( 775 _Out_ PHANDLE SemaphoreHandle, 776 _In_ ACCESS_MASK DesiredAcces, 777 _In_ POBJECT_ATTRIBUTES ObjectAttributes 778 ); 779 780 #ifdef NTOS_MODE_USER 781 NTSYSAPI 782 NTSTATUS 783 NTAPI 784 ZwOpenTimer( 785 _Out_ PHANDLE TimerHandle, 786 _In_ ACCESS_MASK DesiredAccess, 787 _In_ POBJECT_ATTRIBUTES ObjectAttributes 788 ); 789 #endif 790 791 NTSYSAPI 792 NTSTATUS 793 NTAPI 794 ZwPulseEvent( 795 _In_ HANDLE EventHandle, 796 _In_opt_ PLONG PulseCount 797 ); 798 799 NTSYSAPI 800 NTSTATUS 801 NTAPI 802 ZwQueryDefaultLocale( 803 _In_ BOOLEAN UserProfile, 804 _Out_ PLCID DefaultLocaleId 805 ); 806 807 NTSYSAPI 808 NTSTATUS 809 NTAPI 810 ZwQueryDefaultUILanguage( 811 LANGID* LanguageId 812 ); 813 814 NTSYSAPI 815 NTSTATUS 816 NTAPI 817 ZwQueryEvent( 818 _In_ HANDLE EventHandle, 819 _In_ EVENT_INFORMATION_CLASS EventInformationClass, 820 _Out_ PVOID EventInformation, 821 _In_ ULONG EventInformationLength, 822 _Out_ PULONG ReturnLength 823 ); 824 825 NTSYSAPI 826 NTSTATUS 827 NTAPI 828 ZwQueryInformationAtom( 829 _In_ RTL_ATOM Atom, 830 _In_ ATOM_INFORMATION_CLASS AtomInformationClass, 831 _Out_ PVOID AtomInformation, 832 _In_ ULONG AtomInformationLength, 833 _Out_opt_ PULONG ReturnLength 834 ); 835 836 NTSYSAPI 837 NTSTATUS 838 NTAPI 839 ZwQueryInstallUILanguage( 840 LANGID* LanguageId 841 ); 842 843 NTSYSAPI 844 NTSTATUS 845 NTAPI 846 ZwQueryMutant( 847 _In_ HANDLE MutantHandle, 848 _In_ MUTANT_INFORMATION_CLASS MutantInformationClass, 849 _Out_ PVOID MutantInformation, 850 _In_ ULONG Length, 851 _Out_ PULONG ResultLength 852 ); 853 854 NTSYSAPI 855 NTSTATUS 856 NTAPI 857 ZwQuerySemaphore( 858 _In_ HANDLE SemaphoreHandle, 859 _In_ SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass, 860 _Out_ PVOID SemaphoreInformation, 861 _In_ ULONG Length, 862 _Out_ PULONG ReturnLength 863 ); 864 865 NTSYSAPI 866 NTSTATUS 867 NTAPI 868 ZwQuerySystemEnvironmentValue( 869 _In_ PUNICODE_STRING Name, 870 _Out_ PWSTR Value, 871 _In_ ULONG Length, 872 _Out_ PULONG ReturnLength 873 ); 874 875 NTSYSAPI 876 NTSTATUS 877 NTAPI 878 ZwQuerySystemInformation( 879 _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass, 880 _Out_writes_bytes_to_opt_(SystemInformationLength, *ReturnLength) PVOID SystemInformation, 881 _In_ ULONG SystemInformationLength, 882 _Out_opt_ PULONG ReturnLength 883 ); 884 885 NTSYSAPI 886 NTSTATUS 887 NTAPI 888 ZwQueryTimer( 889 _In_ HANDLE TimerHandle, 890 _In_ TIMER_INFORMATION_CLASS TimerInformationClass, 891 _Out_ PVOID TimerInformation, 892 _In_ ULONG Length, 893 _Out_ PULONG ResultLength 894 ); 895 896 NTSYSAPI 897 NTSTATUS 898 NTAPI 899 ZwRaiseHardError( 900 _In_ NTSTATUS ErrorStatus, 901 _In_ ULONG NumberOfParameters, 902 _In_ ULONG UnicodeStringParameterMask, 903 _In_ PULONG_PTR Parameters, 904 _In_ ULONG ValidResponseOptions, 905 _Out_ PULONG Response 906 ); 907 908 NTSYSAPI 909 NTSTATUS 910 NTAPI 911 ZwReleaseMutant( 912 _In_ HANDLE MutantHandle, 913 _In_opt_ PLONG ReleaseCount 914 ); 915 916 NTSYSAPI 917 NTSTATUS 918 NTAPI 919 ZwReleaseSemaphore( 920 _In_ HANDLE SemaphoreHandle, 921 _In_ LONG ReleaseCount, 922 _Out_opt_ PLONG PreviousCount 923 ); 924 925 NTSYSAPI 926 NTSTATUS 927 NTAPI 928 ZwResetEvent( 929 _In_ HANDLE EventHandle, 930 _Out_opt_ PLONG NumberOfWaitingThreads 931 ); 932 933 NTSYSAPI 934 NTSTATUS 935 NTAPI 936 ZwSetDefaultLocale( 937 _In_ BOOLEAN UserProfile, 938 _In_ LCID DefaultLocaleId 939 ); 940 941 NTSYSAPI 942 NTSTATUS 943 NTAPI 944 ZwSetDefaultUILanguage( 945 LANGID LanguageId 946 ); 947 948 NTSYSAPI 949 NTSTATUS 950 NTAPI 951 ZwSetDefaultHardErrorPort( 952 _In_ HANDLE PortHandle 953 ); 954 955 NTSYSAPI 956 NTSTATUS 957 NTAPI 958 ZwSetEvent( 959 _In_ HANDLE EventHandle, 960 _Out_opt_ PLONG PreviousState 961 ); 962 963 NTSYSAPI 964 NTSTATUS 965 NTAPI 966 ZwSetHighEventPair( 967 _In_ HANDLE EventPairHandle 968 ); 969 970 NTSYSAPI 971 NTSTATUS 972 NTAPI 973 ZwSetHighWaitLowEventPair( 974 _In_ HANDLE EventPairHandle 975 ); 976 977 NTSYSAPI 978 NTSTATUS 979 NTAPI 980 ZwSetLowEventPair( 981 _In_ HANDLE EventPair 982 ); 983 984 NTSYSAPI 985 NTSTATUS 986 NTAPI 987 ZwSetLowWaitHighEventPair( 988 _In_ HANDLE EventPair 989 ); 990 991 NTSYSAPI 992 NTSTATUS 993 NTAPI 994 ZwSetSystemEnvironmentValue( 995 _In_ PUNICODE_STRING VariableName, 996 _In_ PUNICODE_STRING Value 997 ); 998 999 NTSYSAPI 1000 NTSTATUS 1001 NTAPI 1002 ZwSetSystemInformation( 1003 _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass, 1004 _In_reads_bytes_(SystemInformationLength) PVOID SystemInformation, 1005 _In_ ULONG SystemInformationLength 1006 ); 1007 1008 #ifdef NTOS_MODE_USER 1009 NTSYSAPI 1010 NTSTATUS 1011 NTAPI 1012 ZwSetTimer( 1013 _In_ HANDLE TimerHandle, 1014 _In_ PLARGE_INTEGER DueTime, 1015 _In_ PTIMER_APC_ROUTINE TimerApcRoutine, 1016 _In_ PVOID TimerContext, 1017 _In_ BOOLEAN WakeTimer, 1018 _In_opt_ LONG Period, 1019 _Out_opt_ PBOOLEAN PreviousState 1020 ); 1021 #endif 1022 1023 NTSYSAPI 1024 NTSTATUS 1025 NTAPI 1026 ZwSetUuidSeed( 1027 _In_ PUCHAR UuidSeed 1028 ); 1029 1030 NTSYSAPI 1031 NTSTATUS 1032 NTAPI 1033 ZwShutdownSystem( 1034 _In_ SHUTDOWN_ACTION Action 1035 ); 1036 1037 NTSYSAPI 1038 NTSTATUS 1039 NTAPI 1040 ZwWaitHighEventPair( 1041 _In_ HANDLE EventPairHandle 1042 ); 1043 1044 NTSYSAPI 1045 NTSTATUS 1046 NTAPI 1047 ZwWaitLowEventPair( 1048 _In_ HANDLE EventPairHandle 1049 ); 1050 1051 NTSYSAPI 1052 NTSTATUS 1053 NTAPI 1054 ZwTraceEvent( 1055 _In_ ULONG TraceHandle, 1056 _In_ ULONG Flags, 1057 _In_ ULONG TraceHeaderLength, 1058 _In_ PEVENT_TRACE_HEADER TraceHeader 1059 ); 1060 1061 #ifdef __cplusplus 1062 } 1063 #endif 1064 1065 #endif 1066