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 _In_ PVOID Value, 400 _Inout_ PULONG ReturnLength, 401 _Inout_ 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_ PVOID Value, 554 _Inout_ PULONG ReturnLength, 555 _Inout_ PULONG Attributes 556 ); 557 558 NTSYSCALLAPI 559 NTSTATUS 560 NTAPI 561 NtSetSystemInformation( 562 _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass, 563 _In_ PVOID SystemInformation, 564 _In_ ULONG SystemInformationLength 565 ); 566 567 NTSYSCALLAPI 568 NTSTATUS 569 NTAPI 570 NtSetTimer( 571 _In_ HANDLE TimerHandle, 572 _In_ PLARGE_INTEGER DueTime, 573 _In_ PTIMER_APC_ROUTINE TimerApcRoutine, 574 _In_ PVOID TimerContext, 575 _In_ BOOLEAN WakeTimer, 576 _In_opt_ LONG Period, 577 _Out_opt_ PBOOLEAN PreviousState 578 ); 579 580 NTSYSCALLAPI 581 NTSTATUS 582 NTAPI 583 NtSetUuidSeed( 584 _In_ PUCHAR UuidSeed 585 ); 586 587 NTSYSCALLAPI 588 NTSTATUS 589 NTAPI 590 NtShutdownSystem( 591 _In_ SHUTDOWN_ACTION Action 592 ); 593 594 _IRQL_requires_max_(PASSIVE_LEVEL) 595 NTSYSCALLAPI 596 NTSTATUS 597 NTAPI 598 NtWaitForKeyedEvent( 599 _In_opt_ HANDLE EventHandle, 600 _In_ PVOID Key, 601 _In_ BOOLEAN Alertable, 602 _In_opt_ PLARGE_INTEGER Timeout 603 ); 604 605 NTSYSCALLAPI 606 NTSTATUS 607 NTAPI 608 NtWaitHighEventPair( 609 _In_ HANDLE EventPairHandle 610 ); 611 612 NTSYSCALLAPI 613 NTSTATUS 614 NTAPI 615 NtWaitLowEventPair( 616 _In_ HANDLE EventPairHandle 617 ); 618 619 NTSYSCALLAPI 620 NTSTATUS 621 NTAPI 622 NtTraceEvent( 623 _In_ ULONG TraceHandle, 624 _In_ ULONG Flags, 625 _In_ ULONG TraceHeaderLength, 626 _In_ PEVENT_TRACE_HEADER TraceHeader 627 ); 628 629 NTSYSAPI 630 NTSTATUS 631 NTAPI 632 ZwAddAtom( 633 _In_ PWSTR AtomName, 634 _In_ ULONG AtomNameLength, 635 _Inout_ PRTL_ATOM Atom 636 ); 637 638 #ifdef NTOS_MODE_USER 639 NTSYSAPI 640 NTSTATUS 641 NTAPI 642 ZwCancelTimer( 643 _In_ HANDLE TimerHandle, 644 _Out_opt_ PBOOLEAN CurrentState 645 ); 646 #endif 647 648 NTSYSAPI 649 NTSTATUS 650 NTAPI 651 ZwClearEvent( 652 _In_ HANDLE EventHandle 653 ); 654 655 _IRQL_requires_max_(PASSIVE_LEVEL) 656 NTSYSAPI 657 NTSTATUS 658 NTAPI 659 ZwCreateEvent( 660 _Out_ PHANDLE EventHandle, 661 _In_ ACCESS_MASK DesiredAccess, 662 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 663 _In_ EVENT_TYPE EventType, 664 _In_ BOOLEAN InitialState 665 ); 666 667 NTSYSAPI 668 NTSTATUS 669 NTAPI 670 ZwCreateEventPair( 671 _Out_ PHANDLE EventPairHandle, 672 _In_ ACCESS_MASK DesiredAccess, 673 _In_ POBJECT_ATTRIBUTES ObjectAttributes 674 ); 675 676 _IRQL_requires_max_(PASSIVE_LEVEL) 677 NTSYSAPI 678 NTSTATUS 679 NTAPI 680 ZwCreateKeyedEvent( 681 _Out_ PHANDLE OutHandle, 682 _In_ ACCESS_MASK AccessMask, 683 _In_ POBJECT_ATTRIBUTES ObjectAttributes, 684 _In_ ULONG Flags 685 ); 686 687 NTSYSAPI 688 NTSTATUS 689 NTAPI 690 ZwCreateMutant( 691 _Out_ PHANDLE MutantHandle, 692 _In_ ACCESS_MASK DesiredAccess, 693 _In_ POBJECT_ATTRIBUTES ObjectAttributes, 694 _In_ BOOLEAN InitialOwner 695 ); 696 697 NTSYSAPI 698 NTSTATUS 699 NTAPI 700 ZwCreateSemaphore( 701 _Out_ PHANDLE SemaphoreHandle, 702 _In_ ACCESS_MASK DesiredAccess, 703 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 704 _In_ LONG InitialCount, 705 _In_ LONG MaximumCount 706 ); 707 708 #ifdef NTOS_MODE_USER 709 NTSYSAPI 710 NTSTATUS 711 NTAPI 712 ZwCreateTimer( 713 _Out_ PHANDLE TimerHandle, 714 _In_ ACCESS_MASK DesiredAccess, 715 _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes, 716 _In_ TIMER_TYPE TimerType 717 ); 718 #endif 719 720 NTSYSAPI 721 NTSTATUS 722 NTAPI 723 ZwDeleteAtom( 724 _In_ RTL_ATOM Atom 725 ); 726 727 NTSYSAPI 728 NTSTATUS 729 NTAPI 730 ZwDisplayString( 731 _In_ PUNICODE_STRING DisplayString 732 ); 733 734 NTSYSAPI 735 NTSTATUS 736 NTAPI 737 ZwFindAtom( 738 _In_ PWSTR AtomName, 739 _In_ ULONG AtomNameLength, 740 _Out_opt_ PRTL_ATOM Atom 741 ); 742 743 NTSYSCALLAPI 744 NTSTATUS 745 NTAPI 746 ZwOpenEvent( 747 _Out_ PHANDLE EventHandle, 748 _In_ ACCESS_MASK DesiredAccess, 749 _In_ POBJECT_ATTRIBUTES ObjectAttributes 750 ); 751 752 NTSYSAPI 753 NTSTATUS 754 NTAPI 755 ZwOpenEventPair( 756 _Out_ PHANDLE EventPairHandle, 757 _In_ ACCESS_MASK DesiredAccess, 758 _In_ POBJECT_ATTRIBUTES ObjectAttributes 759 ); 760 761 NTSYSAPI 762 NTSTATUS 763 NTAPI 764 ZwOpenMutant( 765 _Out_ PHANDLE MutantHandle, 766 _In_ ACCESS_MASK DesiredAccess, 767 _In_ POBJECT_ATTRIBUTES ObjectAttributes 768 ); 769 770 NTSYSAPI 771 NTSTATUS 772 NTAPI 773 ZwOpenSemaphore( 774 _Out_ PHANDLE SemaphoreHandle, 775 _In_ ACCESS_MASK DesiredAcces, 776 _In_ POBJECT_ATTRIBUTES ObjectAttributes 777 ); 778 779 #ifdef NTOS_MODE_USER 780 NTSYSAPI 781 NTSTATUS 782 NTAPI 783 ZwOpenTimer( 784 _Out_ PHANDLE TimerHandle, 785 _In_ ACCESS_MASK DesiredAccess, 786 _In_ POBJECT_ATTRIBUTES ObjectAttributes 787 ); 788 #endif 789 790 NTSYSAPI 791 NTSTATUS 792 NTAPI 793 ZwPulseEvent( 794 _In_ HANDLE EventHandle, 795 _In_opt_ PLONG PulseCount 796 ); 797 798 NTSYSAPI 799 NTSTATUS 800 NTAPI 801 ZwQueryDefaultLocale( 802 _In_ BOOLEAN UserProfile, 803 _Out_ PLCID DefaultLocaleId 804 ); 805 806 NTSYSAPI 807 NTSTATUS 808 NTAPI 809 ZwQueryDefaultUILanguage( 810 LANGID* LanguageId 811 ); 812 813 NTSYSAPI 814 NTSTATUS 815 NTAPI 816 ZwQueryEvent( 817 _In_ HANDLE EventHandle, 818 _In_ EVENT_INFORMATION_CLASS EventInformationClass, 819 _Out_ PVOID EventInformation, 820 _In_ ULONG EventInformationLength, 821 _Out_ PULONG ReturnLength 822 ); 823 824 NTSYSAPI 825 NTSTATUS 826 NTAPI 827 ZwQueryInformationAtom( 828 _In_ RTL_ATOM Atom, 829 _In_ ATOM_INFORMATION_CLASS AtomInformationClass, 830 _Out_ PVOID AtomInformation, 831 _In_ ULONG AtomInformationLength, 832 _Out_opt_ PULONG ReturnLength 833 ); 834 835 NTSYSAPI 836 NTSTATUS 837 NTAPI 838 ZwQueryInstallUILanguage( 839 LANGID* LanguageId 840 ); 841 842 NTSYSAPI 843 NTSTATUS 844 NTAPI 845 ZwQueryMutant( 846 _In_ HANDLE MutantHandle, 847 _In_ MUTANT_INFORMATION_CLASS MutantInformationClass, 848 _Out_ PVOID MutantInformation, 849 _In_ ULONG Length, 850 _Out_ PULONG ResultLength 851 ); 852 853 NTSYSAPI 854 NTSTATUS 855 NTAPI 856 ZwQuerySemaphore( 857 _In_ HANDLE SemaphoreHandle, 858 _In_ SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass, 859 _Out_ PVOID SemaphoreInformation, 860 _In_ ULONG Length, 861 _Out_ PULONG ReturnLength 862 ); 863 864 NTSYSAPI 865 NTSTATUS 866 NTAPI 867 ZwQuerySystemEnvironmentValue( 868 _In_ PUNICODE_STRING Name, 869 _Out_ PWSTR Value, 870 _In_ ULONG Length, 871 _Out_ PULONG ReturnLength 872 ); 873 874 NTSYSAPI 875 NTSTATUS 876 NTAPI 877 ZwQuerySystemInformation( 878 _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass, 879 _Out_writes_bytes_to_opt_(SystemInformationLength, *ReturnLength) PVOID SystemInformation, 880 _In_ ULONG SystemInformationLength, 881 _Out_opt_ PULONG ReturnLength 882 ); 883 884 NTSYSAPI 885 NTSTATUS 886 NTAPI 887 ZwQueryTimer( 888 _In_ HANDLE TimerHandle, 889 _In_ TIMER_INFORMATION_CLASS TimerInformationClass, 890 _Out_ PVOID TimerInformation, 891 _In_ ULONG Length, 892 _Out_ PULONG ResultLength 893 ); 894 895 NTSYSAPI 896 NTSTATUS 897 NTAPI 898 ZwRaiseHardError( 899 _In_ NTSTATUS ErrorStatus, 900 _In_ ULONG NumberOfParameters, 901 _In_ ULONG UnicodeStringParameterMask, 902 _In_ PULONG_PTR Parameters, 903 _In_ ULONG ValidResponseOptions, 904 _Out_ PULONG Response 905 ); 906 907 NTSYSAPI 908 NTSTATUS 909 NTAPI 910 ZwReleaseMutant( 911 _In_ HANDLE MutantHandle, 912 _In_opt_ PLONG ReleaseCount 913 ); 914 915 NTSYSAPI 916 NTSTATUS 917 NTAPI 918 ZwReleaseSemaphore( 919 _In_ HANDLE SemaphoreHandle, 920 _In_ LONG ReleaseCount, 921 _Out_opt_ PLONG PreviousCount 922 ); 923 924 NTSYSAPI 925 NTSTATUS 926 NTAPI 927 ZwResetEvent( 928 _In_ HANDLE EventHandle, 929 _Out_opt_ PLONG NumberOfWaitingThreads 930 ); 931 932 NTSYSAPI 933 NTSTATUS 934 NTAPI 935 ZwSetDefaultLocale( 936 _In_ BOOLEAN UserProfile, 937 _In_ LCID DefaultLocaleId 938 ); 939 940 NTSYSAPI 941 NTSTATUS 942 NTAPI 943 ZwSetDefaultUILanguage( 944 LANGID LanguageId 945 ); 946 947 NTSYSAPI 948 NTSTATUS 949 NTAPI 950 ZwSetDefaultHardErrorPort( 951 _In_ HANDLE PortHandle 952 ); 953 954 NTSYSAPI 955 NTSTATUS 956 NTAPI 957 ZwSetEvent( 958 _In_ HANDLE EventHandle, 959 _Out_opt_ PLONG PreviousState 960 ); 961 962 NTSYSAPI 963 NTSTATUS 964 NTAPI 965 ZwSetHighEventPair( 966 _In_ HANDLE EventPairHandle 967 ); 968 969 NTSYSAPI 970 NTSTATUS 971 NTAPI 972 ZwSetHighWaitLowEventPair( 973 _In_ HANDLE EventPairHandle 974 ); 975 976 NTSYSAPI 977 NTSTATUS 978 NTAPI 979 ZwSetLowEventPair( 980 _In_ HANDLE EventPair 981 ); 982 983 NTSYSAPI 984 NTSTATUS 985 NTAPI 986 ZwSetLowWaitHighEventPair( 987 _In_ HANDLE EventPair 988 ); 989 990 NTSYSAPI 991 NTSTATUS 992 NTAPI 993 ZwSetSystemEnvironmentValue( 994 _In_ PUNICODE_STRING VariableName, 995 _In_ PUNICODE_STRING Value 996 ); 997 998 NTSYSAPI 999 NTSTATUS 1000 NTAPI 1001 ZwSetSystemInformation( 1002 _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass, 1003 _In_ PVOID SystemInformation, 1004 _In_ SIZE_T SystemInformationLength 1005 ); 1006 1007 #ifdef NTOS_MODE_USER 1008 NTSYSAPI 1009 NTSTATUS 1010 NTAPI 1011 ZwSetTimer( 1012 _In_ HANDLE TimerHandle, 1013 _In_ PLARGE_INTEGER DueTime, 1014 _In_ PTIMER_APC_ROUTINE TimerApcRoutine, 1015 _In_ PVOID TimerContext, 1016 _In_ BOOLEAN WakeTimer, 1017 _In_opt_ LONG Period, 1018 _Out_opt_ PBOOLEAN PreviousState 1019 ); 1020 #endif 1021 1022 NTSYSAPI 1023 NTSTATUS 1024 NTAPI 1025 ZwSetUuidSeed( 1026 _In_ PUCHAR UuidSeed 1027 ); 1028 1029 NTSYSAPI 1030 NTSTATUS 1031 NTAPI 1032 ZwShutdownSystem( 1033 _In_ SHUTDOWN_ACTION Action 1034 ); 1035 1036 NTSYSAPI 1037 NTSTATUS 1038 NTAPI 1039 ZwWaitHighEventPair( 1040 _In_ HANDLE EventPairHandle 1041 ); 1042 1043 NTSYSAPI 1044 NTSTATUS 1045 NTAPI 1046 ZwWaitLowEventPair( 1047 _In_ HANDLE EventPairHandle 1048 ); 1049 1050 NTSYSAPI 1051 NTSTATUS 1052 NTAPI 1053 ZwTraceEvent( 1054 _In_ ULONG TraceHandle, 1055 _In_ ULONG Flags, 1056 _In_ ULONG TraceHeaderLength, 1057 _In_ PEVENT_TRACE_HEADER TraceHeader 1058 ); 1059 1060 #ifdef __cplusplus 1061 } 1062 #endif 1063 1064 #endif 1065