Changeset 85088 in vbox for trunk/include/iprt/nt
- Timestamp:
- Jul 7, 2020 5:08:28 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138997
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/nt/nt.h
r82968 r85088 301 301 /** Constant UNICODE_STRING initializer. */ 302 302 #define RTNT_CONSTANT_UNISTR(a_String) { sizeof(a_String) - sizeof(WCHAR), sizeof(a_String), (WCHAR *)a_String } 303 /** @} */ 303 304 /** Declaration wrapper for NT apis. 305 * Adds nothrow. Don't use with callbacks. */ 306 #define RT_DECL_NTAPI(type) DECL_NOTHROW(NTSYSAPI type NTAPI) 307 /** @} */ 304 308 305 309 … … 1594 1598 1595 1599 #ifdef IPRT_NT_USE_WINTERNL 1596 NTSYSAPI NTSTATUS NTAPINtCreateSection(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PLARGE_INTEGER, ULONG, ULONG, HANDLE);1600 RT_DECL_NTAPI(NTSTATUS) NtCreateSection(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PLARGE_INTEGER, ULONG, ULONG, HANDLE); 1597 1601 typedef enum _SECTION_INHERIT 1598 1602 { … … 1601 1605 } SECTION_INHERIT; 1602 1606 #endif 1603 NTSYSAPI NTSTATUS NTAPINtMapViewOfSection(HANDLE, HANDLE, PVOID *, ULONG, SIZE_T, PLARGE_INTEGER, PSIZE_T, SECTION_INHERIT,1607 RT_DECL_NTAPI(NTSTATUS) NtMapViewOfSection(HANDLE, HANDLE, PVOID *, ULONG, SIZE_T, PLARGE_INTEGER, PSIZE_T, SECTION_INHERIT, 1604 1608 ULONG, ULONG); 1605 NTSYSAPI NTSTATUS NTAPINtFlushVirtualMemory(HANDLE, PVOID *, PSIZE_T, PIO_STATUS_BLOCK);1606 NTSYSAPI NTSTATUS NTAPINtUnmapViewOfSection(HANDLE, PVOID);1607 1608 NTSYSAPI NTSTATUS NTAPINtOpenProcess(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID);1609 NTSYSAPI NTSTATUS NTAPIZwOpenProcess(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID);1610 NTSYSAPI NTSTATUS NTAPINtOpenThread(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID);1611 NTSYSAPI NTSTATUS NTAPIZwOpenThread(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID);1612 NTSYSAPI NTSTATUS NTAPINtAlertThread(HANDLE hThread);1609 RT_DECL_NTAPI(NTSTATUS) NtFlushVirtualMemory(HANDLE, PVOID *, PSIZE_T, PIO_STATUS_BLOCK); 1610 RT_DECL_NTAPI(NTSTATUS) NtUnmapViewOfSection(HANDLE, PVOID); 1611 1612 RT_DECL_NTAPI(NTSTATUS) NtOpenProcess(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID); 1613 RT_DECL_NTAPI(NTSTATUS) ZwOpenProcess(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID); 1614 RT_DECL_NTAPI(NTSTATUS) NtOpenThread(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID); 1615 RT_DECL_NTAPI(NTSTATUS) ZwOpenThread(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID); 1616 RT_DECL_NTAPI(NTSTATUS) NtAlertThread(HANDLE hThread); 1613 1617 #ifdef IPRT_NT_USE_WINTERNL 1614 NTSYSAPI NTSTATUS NTAPIZwAlertThread(HANDLE hThread);1615 #endif 1616 NTSYSAPI NTSTATUS NTAPINtTestAlert(void);1618 RT_DECL_NTAPI(NTSTATUS) ZwAlertThread(HANDLE hThread); 1619 #endif 1620 RT_DECL_NTAPI(NTSTATUS) NtTestAlert(void); 1617 1621 1618 1622 #ifdef IPRT_NT_USE_WINTERNL 1619 NTSYSAPI NTSTATUS NTAPINtOpenProcessToken(HANDLE, ACCESS_MASK, PHANDLE);1620 NTSYSAPI NTSTATUS NTAPINtOpenThreadToken(HANDLE, ACCESS_MASK, BOOLEAN, PHANDLE);1621 #endif 1622 NTSYSAPI NTSTATUS NTAPIZwOpenProcessToken(HANDLE, ACCESS_MASK, PHANDLE);1623 NTSYSAPI NTSTATUS NTAPIZwOpenThreadToken(HANDLE, ACCESS_MASK, BOOLEAN, PHANDLE);1623 RT_DECL_NTAPI(NTSTATUS) NtOpenProcessToken(HANDLE, ACCESS_MASK, PHANDLE); 1624 RT_DECL_NTAPI(NTSTATUS) NtOpenThreadToken(HANDLE, ACCESS_MASK, BOOLEAN, PHANDLE); 1625 #endif 1626 RT_DECL_NTAPI(NTSTATUS) ZwOpenProcessToken(HANDLE, ACCESS_MASK, PHANDLE); 1627 RT_DECL_NTAPI(NTSTATUS) ZwOpenThreadToken(HANDLE, ACCESS_MASK, BOOLEAN, PHANDLE); 1624 1628 1625 1629 #ifdef IPRT_NT_USE_WINTERNL … … 1771 1775 } FS_INFORMATION_CLASS; 1772 1776 typedef FS_INFORMATION_CLASS *PFS_INFORMATION_CLASS; 1773 NTSYSAPI NTSTATUS NTAPINtQueryVolumeInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FS_INFORMATION_CLASS);1774 NTSYSAPI NTSTATUS NTAPINtSetVolumeInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FS_INFORMATION_CLASS);1777 RT_DECL_NTAPI(NTSTATUS) NtQueryVolumeInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FS_INFORMATION_CLASS); 1778 RT_DECL_NTAPI(NTSTATUS) NtSetVolumeInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FS_INFORMATION_CLASS); 1775 1779 1776 1780 #ifdef IPRT_NT_USE_WINTERNL … … 2443 2447 } FILE_INFORMATION_CLASS; 2444 2448 typedef FILE_INFORMATION_CLASS *PFILE_INFORMATION_CLASS; 2445 NTSYSAPI NTSTATUS NTAPINtQueryInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS);2446 NTSYSAPI NTSTATUS NTAPINtQueryDirectoryFile(HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG,2449 RT_DECL_NTAPI(NTSTATUS) NtQueryInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS); 2450 RT_DECL_NTAPI(NTSTATUS) NtQueryDirectoryFile(HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG, 2447 2451 FILE_INFORMATION_CLASS, BOOLEAN, PUNICODE_STRING, BOOLEAN); 2448 NTSYSAPI NTSTATUS NTAPINtSetInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS);2452 RT_DECL_NTAPI(NTSTATUS) NtSetInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FILE_INFORMATION_CLASS); 2449 2453 #endif /* IPRT_NT_USE_WINTERNL */ 2450 NTSYSAPI NTSTATUS NTAPINtQueryAttributesFile(POBJECT_ATTRIBUTES, PFILE_BASIC_INFORMATION);2451 NTSYSAPI NTSTATUS NTAPINtQueryFullAttributesFile(POBJECT_ATTRIBUTES, PFILE_NETWORK_OPEN_INFORMATION);2454 RT_DECL_NTAPI(NTSTATUS) NtQueryAttributesFile(POBJECT_ATTRIBUTES, PFILE_BASIC_INFORMATION); 2455 RT_DECL_NTAPI(NTSTATUS) NtQueryFullAttributesFile(POBJECT_ATTRIBUTES, PFILE_NETWORK_OPEN_INFORMATION); 2452 2456 2453 2457 … … 2571 2575 MaxKeyInfoClass 2572 2576 } KEY_INFORMATION_CLASS; 2573 NTSYSAPI NTSTATUS NTAPINtQueryKey(HANDLE, KEY_INFORMATION_CLASS, PVOID, ULONG, PULONG);2574 NTSYSAPI NTSTATUS NTAPINtEnumerateKey(HANDLE, ULONG, KEY_INFORMATION_CLASS, PVOID, ULONG, PULONG);2577 RT_DECL_NTAPI(NTSTATUS) NtQueryKey(HANDLE, KEY_INFORMATION_CLASS, PVOID, ULONG, PULONG); 2578 RT_DECL_NTAPI(NTSTATUS) NtEnumerateKey(HANDLE, ULONG, KEY_INFORMATION_CLASS, PVOID, ULONG, PULONG); 2575 2579 2576 2580 typedef struct _MEMORY_SECTION_NAME … … 2691 2695 } PROCESSINFOCLASS; 2692 2696 AssertCompile(ProcessSequenceNumber == 0x5c); 2693 NTSYSAPI NTSTATUS NTAPINtQueryInformationProcess(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG);2697 RT_DECL_NTAPI(NTSTATUS) NtQueryInformationProcess(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); 2694 2698 #if ARCH_BITS == 32 2695 2699 /** 64-bit API pass thru to WOW64 processes. */ 2696 NTSYSAPI NTSTATUS NTAPINtWow64QueryInformationProcess64(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG);2700 RT_DECL_NTAPI(NTSTATUS) NtWow64QueryInformationProcess64(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); 2697 2701 #endif 2698 2702 … … 2736 2740 MaxThreadInfoClass 2737 2741 } THREADINFOCLASS; 2738 NTSYSAPI NTSTATUS NTAPINtSetInformationThread(HANDLE, THREADINFOCLASS, LPCVOID, ULONG);2739 2740 NTSYSAPI NTSTATUS NTAPINtQueryInformationToken(HANDLE, TOKEN_INFORMATION_CLASS, PVOID, ULONG, PULONG);2741 NTSYSAPI NTSTATUS NTAPIZwQueryInformationToken(HANDLE, TOKEN_INFORMATION_CLASS, PVOID, ULONG, PULONG);2742 2743 NTSYSAPI NTSTATUS NTAPINtReadFile(HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG, PLARGE_INTEGER, PULONG);2744 NTSYSAPI NTSTATUS NTAPINtWriteFile(HANDLE, HANDLE, PIO_APC_ROUTINE, void const *, PIO_STATUS_BLOCK, PVOID, ULONG, PLARGE_INTEGER, PULONG);2745 NTSYSAPI NTSTATUS NTAPINtFlushBuffersFile(HANDLE, PIO_STATUS_BLOCK);2746 NTSYSAPI NTSTATUS NTAPINtCancelIoFile(HANDLE, PIO_STATUS_BLOCK);2747 2748 NTSYSAPI NTSTATUS NTAPINtReadVirtualMemory(HANDLE, PVOID, PVOID, SIZE_T, PSIZE_T);2749 NTSYSAPI NTSTATUS NTAPINtWriteVirtualMemory(HANDLE, PVOID, void const *, SIZE_T, PSIZE_T);2750 2751 NTSYSAPI NTSTATUS NTAPIRtlAddAccessAllowedAce(PACL, ULONG, ULONG, PSID);2752 NTSYSAPI NTSTATUS NTAPIRtlCopySid(ULONG, PSID, PSID);2753 NTSYSAPI NTSTATUS NTAPIRtlCreateAcl(PACL, ULONG, ULONG);2754 NTSYSAPI NTSTATUS NTAPIRtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR, ULONG);2755 NTSYSAPI BOOLEAN NTAPIRtlEqualSid(PSID, PSID);2756 NTSYSAPI NTSTATUS NTAPIRtlGetVersion(PRTL_OSVERSIONINFOW);2757 NTSYSAPI NTSTATUS NTAPIRtlInitializeSid(PSID, PSID_IDENTIFIER_AUTHORITY, UCHAR);2758 NTSYSAPI NTSTATUS NTAPIRtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN);2759 NTSYSAPI PULONG NTAPIRtlSubAuthoritySid(PSID, ULONG);2742 RT_DECL_NTAPI(NTSTATUS) NtSetInformationThread(HANDLE, THREADINFOCLASS, LPCVOID, ULONG); 2743 2744 RT_DECL_NTAPI(NTSTATUS) NtQueryInformationToken(HANDLE, TOKEN_INFORMATION_CLASS, PVOID, ULONG, PULONG); 2745 RT_DECL_NTAPI(NTSTATUS) ZwQueryInformationToken(HANDLE, TOKEN_INFORMATION_CLASS, PVOID, ULONG, PULONG); 2746 2747 RT_DECL_NTAPI(NTSTATUS) NtReadFile(HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG, PLARGE_INTEGER, PULONG); 2748 RT_DECL_NTAPI(NTSTATUS) NtWriteFile(HANDLE, HANDLE, PIO_APC_ROUTINE, void const *, PIO_STATUS_BLOCK, PVOID, ULONG, PLARGE_INTEGER, PULONG); 2749 RT_DECL_NTAPI(NTSTATUS) NtFlushBuffersFile(HANDLE, PIO_STATUS_BLOCK); 2750 RT_DECL_NTAPI(NTSTATUS) NtCancelIoFile(HANDLE, PIO_STATUS_BLOCK); 2751 2752 RT_DECL_NTAPI(NTSTATUS) NtReadVirtualMemory(HANDLE, PVOID, PVOID, SIZE_T, PSIZE_T); 2753 RT_DECL_NTAPI(NTSTATUS) NtWriteVirtualMemory(HANDLE, PVOID, void const *, SIZE_T, PSIZE_T); 2754 2755 RT_DECL_NTAPI(NTSTATUS) RtlAddAccessAllowedAce(PACL, ULONG, ULONG, PSID); 2756 RT_DECL_NTAPI(NTSTATUS) RtlCopySid(ULONG, PSID, PSID); 2757 RT_DECL_NTAPI(NTSTATUS) RtlCreateAcl(PACL, ULONG, ULONG); 2758 RT_DECL_NTAPI(NTSTATUS) RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR, ULONG); 2759 RT_DECL_NTAPI(BOOLEAN) RtlEqualSid(PSID, PSID); 2760 RT_DECL_NTAPI(NTSTATUS) RtlGetVersion(PRTL_OSVERSIONINFOW); 2761 RT_DECL_NTAPI(NTSTATUS) RtlInitializeSid(PSID, PSID_IDENTIFIER_AUTHORITY, UCHAR); 2762 RT_DECL_NTAPI(NTSTATUS) RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN); 2763 RT_DECL_NTAPI(PULONG) RtlSubAuthoritySid(PSID, ULONG); 2760 2764 2761 2765 #endif /* IPRT_NT_USE_WINTERNL */ … … 2804 2808 # define NtQueryObject ZwQueryObject 2805 2809 #endif 2806 NTSYSAPI NTSTATUS NTAPINtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG);2807 NTSYSAPI NTSTATUS NTAPINtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG);2808 NTSYSAPI NTSTATUS NTAPINtDuplicateObject(HANDLE, HANDLE, HANDLE, PHANDLE, ACCESS_MASK, ULONG, ULONG);2809 2810 NTSYSAPI NTSTATUS NTAPINtOpenDirectoryObject(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);2810 RT_DECL_NTAPI(NTSTATUS) NtQueryObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG, PULONG); 2811 RT_DECL_NTAPI(NTSTATUS) NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG); 2812 RT_DECL_NTAPI(NTSTATUS) NtDuplicateObject(HANDLE, HANDLE, HANDLE, PHANDLE, ACCESS_MASK, ULONG, ULONG); 2813 2814 RT_DECL_NTAPI(NTSTATUS) NtOpenDirectoryObject(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES); 2811 2815 2812 2816 typedef struct _OBJECT_DIRECTORY_INFORMATION … … 2816 2820 } OBJECT_DIRECTORY_INFORMATION; 2817 2821 typedef OBJECT_DIRECTORY_INFORMATION *POBJECT_DIRECTORY_INFORMATION; 2818 NTSYSAPI NTSTATUS NTAPINtQueryDirectoryObject(HANDLE, PVOID, ULONG, BOOLEAN, BOOLEAN, PULONG, PULONG);2819 2820 NTSYSAPI NTSTATUS NTAPINtSuspendProcess(HANDLE);2821 NTSYSAPI NTSTATUS NTAPINtResumeProcess(HANDLE);2822 RT_DECL_NTAPI(NTSTATUS) NtQueryDirectoryObject(HANDLE, PVOID, ULONG, BOOLEAN, BOOLEAN, PULONG, PULONG); 2823 2824 RT_DECL_NTAPI(NTSTATUS) NtSuspendProcess(HANDLE); 2825 RT_DECL_NTAPI(NTSTATUS) NtResumeProcess(HANDLE); 2822 2826 /** @name ProcessDefaultHardErrorMode bit definitions. 2823 2827 * @{ */ … … 2827 2831 #define PROCESS_HARDERR_NO_OPEN_FILE_ERROR UINT32_C(0x00008000) 2828 2832 /** @} */ 2829 NTSYSAPI NTSTATUS NTAPINtSetInformationProcess(HANDLE, PROCESSINFOCLASS, PVOID, ULONG);2830 NTSYSAPI NTSTATUS NTAPINtTerminateProcess(HANDLE, LONG);2833 RT_DECL_NTAPI(NTSTATUS) NtSetInformationProcess(HANDLE, PROCESSINFOCLASS, PVOID, ULONG); 2834 RT_DECL_NTAPI(NTSTATUS) NtTerminateProcess(HANDLE, LONG); 2831 2835 2832 2836 /** Returned by NtQUerySection with SectionBasicInformation. */ … … 2885 2889 MaxSectionInfoClass 2886 2890 } SECTION_INFORMATION_CLASS; 2887 NTSYSAPI NTSTATUS NTAPINtQuerySection(HANDLE, SECTION_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T);2888 2889 NTSYSAPI NTSTATUS NTAPINtCreateSymbolicLinkObject(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PUNICODE_STRING pTarget);2890 NTSYSAPI NTSTATUS NTAPINtOpenSymbolicLinkObject(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);2891 NTSYSAPI NTSTATUS NTAPINtQuerySymbolicLinkObject(HANDLE, PUNICODE_STRING, PULONG);2891 RT_DECL_NTAPI(NTSTATUS) NtQuerySection(HANDLE, SECTION_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T); 2892 2893 RT_DECL_NTAPI(NTSTATUS) NtCreateSymbolicLinkObject(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PUNICODE_STRING pTarget); 2894 RT_DECL_NTAPI(NTSTATUS) NtOpenSymbolicLinkObject(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES); 2895 RT_DECL_NTAPI(NTSTATUS) NtQuerySymbolicLinkObject(HANDLE, PUNICODE_STRING, PULONG); 2892 2896 #ifndef SYMBOLIC_LINK_QUERY 2893 2897 # define SYMBOLIC_LINK_QUERY UINT32_C(0x00000001) … … 2897 2901 #endif 2898 2902 2899 NTSYSAPI NTSTATUS NTAPINtQueryInformationThread(HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG);2900 NTSYSAPI NTSTATUS NTAPINtResumeThread(HANDLE, PULONG);2901 NTSYSAPI NTSTATUS NTAPINtSuspendThread(HANDLE, PULONG);2902 NTSYSAPI NTSTATUS NTAPINtTerminateThread(HANDLE, LONG);2903 NTSYSAPI NTSTATUS NTAPINtGetContextThread(HANDLE, PCONTEXT);2904 NTSYSAPI NTSTATUS NTAPINtSetContextThread(HANDLE, PCONTEXT);2905 NTSYSAPI NTSTATUS NTAPIZwYieldExecution(void);2903 RT_DECL_NTAPI(NTSTATUS) NtQueryInformationThread(HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG); 2904 RT_DECL_NTAPI(NTSTATUS) NtResumeThread(HANDLE, PULONG); 2905 RT_DECL_NTAPI(NTSTATUS) NtSuspendThread(HANDLE, PULONG); 2906 RT_DECL_NTAPI(NTSTATUS) NtTerminateThread(HANDLE, LONG); 2907 RT_DECL_NTAPI(NTSTATUS) NtGetContextThread(HANDLE, PCONTEXT); 2908 RT_DECL_NTAPI(NTSTATUS) NtSetContextThread(HANDLE, PCONTEXT); 2909 RT_DECL_NTAPI(NTSTATUS) ZwYieldExecution(void); 2906 2910 2907 2911 … … 2942 2946 # define NtQueryVirtualMemory ZwQueryVirtualMemory 2943 2947 #endif 2944 NTSYSAPI NTSTATUS NTAPINtQueryVirtualMemory(HANDLE, void const *, MEMORY_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T);2948 RT_DECL_NTAPI(NTSTATUS) NtQueryVirtualMemory(HANDLE, void const *, MEMORY_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T); 2945 2949 #ifdef IPRT_NT_USE_WINTERNL 2946 NTSYSAPI NTSTATUS NTAPINtAllocateVirtualMemory(HANDLE, PVOID *, ULONG, PSIZE_T, ULONG, ULONG);2947 #endif 2948 NTSYSAPI NTSTATUS NTAPINtFreeVirtualMemory(HANDLE, PVOID *, PSIZE_T, ULONG);2949 NTSYSAPI NTSTATUS NTAPINtProtectVirtualMemory(HANDLE, PVOID *, PSIZE_T, ULONG, PULONG);2950 RT_DECL_NTAPI(NTSTATUS) NtAllocateVirtualMemory(HANDLE, PVOID *, ULONG, PSIZE_T, ULONG, ULONG); 2951 #endif 2952 RT_DECL_NTAPI(NTSTATUS) NtFreeVirtualMemory(HANDLE, PVOID *, PSIZE_T, ULONG); 2953 RT_DECL_NTAPI(NTSTATUS) NtProtectVirtualMemory(HANDLE, PVOID *, PSIZE_T, ULONG, PULONG); 2950 2954 2951 2955 typedef enum _SYSTEM_INFORMATION_CLASS … … 3198 3202 typedef RTL_PROCESS_MODULES *PRTL_PROCESS_MODULES; 3199 3203 3200 NTSYSAPI NTSTATUS NTAPINtQuerySystemInformation(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);3204 RT_DECL_NTAPI(NTSTATUS) NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); 3201 3205 #ifndef IPRT_NT_MAP_TO_ZW 3202 NTSYSAPI NTSTATUS NTAPIZwQuerySystemInformation(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);3203 #endif 3204 3205 NTSYSAPI NTSTATUS NTAPINtSetTimerResolution(ULONG cNtTicksWanted, BOOLEAN fSetResolution, PULONG pcNtTicksCur);3206 NTSYSAPI NTSTATUS NTAPINtQueryTimerResolution(PULONG pcNtTicksMin, PULONG pcNtTicksMax, PULONG pcNtTicksCur);3207 3208 NTSYSAPI NTSTATUS NTAPINtDelayExecution(BOOLEAN, PLARGE_INTEGER);3209 NTSYSAPI NTSTATUS NTAPINtYieldExecution(void);3206 RT_DECL_NTAPI(NTSTATUS) ZwQuerySystemInformation(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); 3207 #endif 3208 3209 RT_DECL_NTAPI(NTSTATUS) NtSetTimerResolution(ULONG cNtTicksWanted, BOOLEAN fSetResolution, PULONG pcNtTicksCur); 3210 RT_DECL_NTAPI(NTSTATUS) NtQueryTimerResolution(PULONG pcNtTicksMin, PULONG pcNtTicksMax, PULONG pcNtTicksCur); 3211 3212 RT_DECL_NTAPI(NTSTATUS) NtDelayExecution(BOOLEAN, PLARGE_INTEGER); 3213 RT_DECL_NTAPI(NTSTATUS) NtYieldExecution(void); 3210 3214 #ifndef IPRT_NT_USE_WINTERNL 3211 NTSYSAPI NTSTATUS NTAPINtWaitForSingleObject(HANDLE, BOOLEAN PLARGE_INTEGER);3215 RT_DECL_NTAPI(NTSTATUS) NtWaitForSingleObject(HANDLE, BOOLEAN PLARGE_INTEGER); 3212 3216 #endif 3213 3217 typedef NTSYSAPI NTSTATUS (NTAPI *PFNNTWAITFORSINGLEOBJECT)(HANDLE, BOOLEAN, PLARGE_INTEGER); 3214 3218 typedef enum _OBJECT_WAIT_TYPE { WaitAllObjects = 0, WaitAnyObject = 1, ObjectWaitTypeHack = 0x7fffffff } OBJECT_WAIT_TYPE; 3215 NTSYSAPI NTSTATUS NTAPINtWaitForMultipleObjects(ULONG, PHANDLE, OBJECT_WAIT_TYPE, BOOLEAN, PLARGE_INTEGER);3216 3217 NTSYSAPI NTSTATUS NTAPINtQuerySecurityObject(HANDLE, ULONG, PSECURITY_DESCRIPTOR, ULONG, PULONG);3219 RT_DECL_NTAPI(NTSTATUS) NtWaitForMultipleObjects(ULONG, PHANDLE, OBJECT_WAIT_TYPE, BOOLEAN, PLARGE_INTEGER); 3220 3221 RT_DECL_NTAPI(NTSTATUS) NtQuerySecurityObject(HANDLE, ULONG, PSECURITY_DESCRIPTOR, ULONG, PULONG); 3218 3222 3219 3223 #ifdef IPRT_NT_USE_WINTERNL … … 3226 3230 } EVENT_TYPE; 3227 3231 #endif 3228 NTSYSAPI NTSTATUS NTAPINtCreateEvent(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, EVENT_TYPE, BOOLEAN);3229 NTSYSAPI NTSTATUS NTAPINtOpenEvent(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);3232 RT_DECL_NTAPI(NTSTATUS) NtCreateEvent(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, EVENT_TYPE, BOOLEAN); 3233 RT_DECL_NTAPI(NTSTATUS) NtOpenEvent(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES); 3230 3234 typedef NTSYSAPI NTSTATUS (NTAPI *PFNNTCLEAREVENT)(HANDLE); 3231 NTSYSAPI NTSTATUS NTAPINtClearEvent(HANDLE);3232 NTSYSAPI NTSTATUS NTAPINtResetEvent(HANDLE, PULONG);3233 NTSYSAPI NTSTATUS NTAPINtSetEvent(HANDLE, PULONG);3235 RT_DECL_NTAPI(NTSTATUS) NtClearEvent(HANDLE); 3236 RT_DECL_NTAPI(NTSTATUS) NtResetEvent(HANDLE, PULONG); 3237 RT_DECL_NTAPI(NTSTATUS) NtSetEvent(HANDLE, PULONG); 3234 3238 typedef NTSYSAPI NTSTATUS (NTAPI *PFNNTSETEVENT)(HANDLE, PULONG); 3235 3239 typedef enum _EVENT_INFORMATION_CLASS … … 3244 3248 } EVENT_BASIC_INFORMATION; 3245 3249 typedef EVENT_BASIC_INFORMATION *PEVENT_BASIC_INFORMATION; 3246 NTSYSAPI NTSTATUS NTAPINtQueryEvent(HANDLE, EVENT_INFORMATION_CLASS, PVOID, ULONG, PULONG);3250 RT_DECL_NTAPI(NTSTATUS) NtQueryEvent(HANDLE, EVENT_INFORMATION_CLASS, PVOID, ULONG, PULONG); 3247 3251 3248 3252 #ifdef IPRT_NT_USE_WINTERNL … … 3267 3271 typedef KEY_VALUE_PARTIAL_INFORMATION *PKEY_VALUE_PARTIAL_INFORMATION; 3268 3272 #endif 3269 NTSYSAPI NTSTATUS NTAPINtOpenKey(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);3270 NTSYSAPI NTSTATUS NTAPINtQueryValueKey(HANDLE, PUNICODE_STRING, KEY_VALUE_INFORMATION_CLASS, PVOID, ULONG, PULONG);3271 3272 3273 NTSYSAPI NTSTATUS NTAPIRtlAddAccessDeniedAce(PACL, ULONG, ULONG, PSID);3273 RT_DECL_NTAPI(NTSTATUS) NtOpenKey(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES); 3274 RT_DECL_NTAPI(NTSTATUS) NtQueryValueKey(HANDLE, PUNICODE_STRING, KEY_VALUE_INFORMATION_CLASS, PVOID, ULONG, PULONG); 3275 3276 3277 RT_DECL_NTAPI(NTSTATUS) RtlAddAccessDeniedAce(PACL, ULONG, ULONG, PSID); 3274 3278 3275 3279 … … 3341 3345 3342 3346 3343 NTSYSAPI NTSTATUS NTAPIRtlCreateUserProcess(PUNICODE_STRING, ULONG, PRTL_USER_PROCESS_PARAMETERS, PSECURITY_DESCRIPTOR,3347 RT_DECL_NTAPI(NTSTATUS) RtlCreateUserProcess(PUNICODE_STRING, ULONG, PRTL_USER_PROCESS_PARAMETERS, PSECURITY_DESCRIPTOR, 3344 3348 PSECURITY_DESCRIPTOR, HANDLE, BOOLEAN, HANDLE, HANDLE, PRTL_USER_PROCESS_INFORMATION); 3345 NTSYSAPI NTSTATUS NTAPIRtlCreateProcessParameters(PRTL_USER_PROCESS_PARAMETERS *, PUNICODE_STRING ImagePathName,3349 RT_DECL_NTAPI(NTSTATUS) RtlCreateProcessParameters(PRTL_USER_PROCESS_PARAMETERS *, PUNICODE_STRING ImagePathName, 3346 3350 PUNICODE_STRING DllPath, PUNICODE_STRING CurrentDirectory, 3347 3351 PUNICODE_STRING CommandLine, PUNICODE_STRING Environment, 3348 3352 PUNICODE_STRING WindowTitle, PUNICODE_STRING DesktopInfo, 3349 3353 PUNICODE_STRING ShellInfo, PUNICODE_STRING RuntimeInfo); 3350 NTSYSAPI VOID NTAPIRtlDestroyProcessParameters(PRTL_USER_PROCESS_PARAMETERS);3351 NTSYSAPI NTSTATUS NTAPIRtlCreateUserThread(HANDLE, PSECURITY_DESCRIPTOR, BOOLEAN, ULONG, SIZE_T, SIZE_T,3354 RT_DECL_NTAPI(VOID) RtlDestroyProcessParameters(PRTL_USER_PROCESS_PARAMETERS); 3355 RT_DECL_NTAPI(NTSTATUS) RtlCreateUserThread(HANDLE, PSECURITY_DESCRIPTOR, BOOLEAN, ULONG, SIZE_T, SIZE_T, 3352 3356 PFNRT, PVOID, PHANDLE, PCLIENT_ID); 3353 3357 … … 3365 3369 #endif 3366 3370 3367 /* NTSYSAPI ULONG NTAPIRtlNtStatusToDosError(NTSTATUS rcNt);*/3371 /*RT_DECL_NTAPI(ULONG) RtlNtStatusToDosError(NTSTATUS rcNt);*/ 3368 3372 3369 3373 /** @def RTL_QUERY_REGISTRY_TYPECHECK … … 3390 3394 typedef ULONG KEPROCESSORINDEX; /**< Bitmap indexes != process numbers, apparently. */ 3391 3395 3392 NTSYSAPI VOID NTAPIKeInitializeAffinityEx(PKAFFINITY_EX pAffinity);3396 RT_DECL_NTAPI(VOID) KeInitializeAffinityEx(PKAFFINITY_EX pAffinity); 3393 3397 typedef VOID (NTAPI *PFNKEINITIALIZEAFFINITYEX)(PKAFFINITY_EX pAffinity); 3394 NTSYSAPI VOID NTAPIKeAddProcessorAffinityEx(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor);3398 RT_DECL_NTAPI(VOID) KeAddProcessorAffinityEx(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor); 3395 3399 typedef VOID (NTAPI *PFNKEADDPROCESSORAFFINITYEX)(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor); 3396 NTSYSAPI VOID NTAPIKeRemoveProcessorAffinityEx(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor);3400 RT_DECL_NTAPI(VOID) KeRemoveProcessorAffinityEx(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor); 3397 3401 typedef VOID (NTAPI *PFNKEREMOVEPROCESSORAFFINITYEX)(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor); 3398 NTSYSAPI BOOLEAN NTAPIKeInterlockedSetProcessorAffinityEx(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor);3402 RT_DECL_NTAPI(BOOLEAN) KeInterlockedSetProcessorAffinityEx(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor); 3399 3403 typedef BOOLEAN (NTAPI *PFNKEINTERLOCKEDSETPROCESSORAFFINITYEX)(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor); 3400 NTSYSAPI BOOLEAN NTAPIKeInterlockedClearProcessorAffinityEx(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor);3404 RT_DECL_NTAPI(BOOLEAN) KeInterlockedClearProcessorAffinityEx(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor); 3401 3405 typedef BOOLEAN (NTAPI *PFNKEINTERLOCKEDCLEARPROCESSORAFFINITYEX)(PKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor); 3402 NTSYSAPI BOOLEAN NTAPIKeCheckProcessorAffinityEx(PCKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor);3406 RT_DECL_NTAPI(BOOLEAN) KeCheckProcessorAffinityEx(PCKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor); 3403 3407 typedef BOOLEAN (NTAPI *PFNKECHECKPROCESSORAFFINITYEX)(PCKAFFINITY_EX pAffinity, KEPROCESSORINDEX idxProcessor); 3404 NTSYSAPI VOID NTAPIKeCopyAffinityEx(PKAFFINITY_EX pDst, PCKAFFINITY_EX pSrc);3408 RT_DECL_NTAPI(VOID) KeCopyAffinityEx(PKAFFINITY_EX pDst, PCKAFFINITY_EX pSrc); 3405 3409 typedef VOID (NTAPI *PFNKECOPYAFFINITYEX)(PKAFFINITY_EX pDst, PCKAFFINITY_EX pSrc); 3406 NTSYSAPI VOID NTAPIKeComplementAffinityEx(PKAFFINITY_EX pResult, PCKAFFINITY_EX pIn);3410 RT_DECL_NTAPI(VOID) KeComplementAffinityEx(PKAFFINITY_EX pResult, PCKAFFINITY_EX pIn); 3407 3411 typedef VOID (NTAPI *PFNKECOMPLEMENTAFFINITYEX)(PKAFFINITY_EX pResult, PCKAFFINITY_EX pIn); 3408 NTSYSAPI BOOLEAN NTAPIKeAndAffinityEx(PCKAFFINITY_EX pIn1, PCKAFFINITY_EX pIn2, PKAFFINITY_EX pResult OPTIONAL);3412 RT_DECL_NTAPI(BOOLEAN) KeAndAffinityEx(PCKAFFINITY_EX pIn1, PCKAFFINITY_EX pIn2, PKAFFINITY_EX pResult OPTIONAL); 3409 3413 typedef BOOLEAN (NTAPI *PFNKEANDAFFINITYEX)(PCKAFFINITY_EX pIn1, PCKAFFINITY_EX pIn2, PKAFFINITY_EX pResult OPTIONAL); 3410 NTSYSAPI BOOLEAN NTAPIKeOrAffinityEx(PCKAFFINITY_EX pIn1, PCKAFFINITY_EX pIn2, PKAFFINITY_EX pResult OPTIONAL);3414 RT_DECL_NTAPI(BOOLEAN) KeOrAffinityEx(PCKAFFINITY_EX pIn1, PCKAFFINITY_EX pIn2, PKAFFINITY_EX pResult OPTIONAL); 3411 3415 typedef BOOLEAN (NTAPI *PFNKEORAFFINITYEX)(PCKAFFINITY_EX pIn1, PCKAFFINITY_EX pIn2, PKAFFINITY_EX pResult OPTIONAL); 3412 3416 /** Works like anding the complemented subtrahend with the minuend. */ 3413 NTSYSAPI BOOLEAN NTAPIKeSubtractAffinityEx(PCKAFFINITY_EX pMinuend, PCKAFFINITY_EX pSubtrahend, PKAFFINITY_EX pResult OPTIONAL);3417 RT_DECL_NTAPI(BOOLEAN) KeSubtractAffinityEx(PCKAFFINITY_EX pMinuend, PCKAFFINITY_EX pSubtrahend, PKAFFINITY_EX pResult OPTIONAL); 3414 3418 typedef BOOLEAN (NTAPI *PFNKESUBTRACTAFFINITYEX)(PCKAFFINITY_EX pMinuend, PCKAFFINITY_EX pSubtrahend, PKAFFINITY_EX pResult OPTIONAL); 3415 NTSYSAPI BOOLEAN NTAPIKeIsEqualAffinityEx(PCKAFFINITY_EX pLeft, PCKAFFINITY_EX pRight);3419 RT_DECL_NTAPI(BOOLEAN) KeIsEqualAffinityEx(PCKAFFINITY_EX pLeft, PCKAFFINITY_EX pRight); 3416 3420 typedef BOOLEAN (NTAPI *PFNKEISEQUALAFFINITYEX)(PCKAFFINITY_EX pLeft, PCKAFFINITY_EX pRight); 3417 NTSYSAPI BOOLEAN NTAPIKeIsEmptyAffinityEx(PCKAFFINITY_EX pAffinity);3421 RT_DECL_NTAPI(BOOLEAN) KeIsEmptyAffinityEx(PCKAFFINITY_EX pAffinity); 3418 3422 typedef BOOLEAN (NTAPI *PFNKEISEMPTYAFFINITYEX)(PCKAFFINITY_EX pAffinity); 3419 NTSYSAPI BOOLEAN NTAPIKeIsSubsetAffinityEx(PCKAFFINITY_EX pSubset, PCKAFFINITY_EX pSuperSet);3423 RT_DECL_NTAPI(BOOLEAN) KeIsSubsetAffinityEx(PCKAFFINITY_EX pSubset, PCKAFFINITY_EX pSuperSet); 3420 3424 typedef BOOLEAN (NTAPI *PFNKEISSUBSETAFFINITYEX)(PCKAFFINITY_EX pSubset, PCKAFFINITY_EX pSuperSet); 3421 NTSYSAPI ULONG NTAPIKeCountSetBitsAffinityEx(PCKAFFINITY_EX pAffinity);3425 RT_DECL_NTAPI(ULONG) KeCountSetBitsAffinityEx(PCKAFFINITY_EX pAffinity); 3422 3426 typedef ULONG (NTAPI *PFNKECOUNTSETAFFINITYEX)(PCKAFFINITY_EX pAffinity); 3423 NTSYSAPI KEPROCESSORINDEX NTAPIKeFindFirstSetLeftAffinityEx(PCKAFFINITY_EX pAffinity);3427 RT_DECL_NTAPI(KEPROCESSORINDEX) KeFindFirstSetLeftAffinityEx(PCKAFFINITY_EX pAffinity); 3424 3428 typedef KEPROCESSORINDEX (NTAPI *PFNKEFINDFIRSTSETLEFTAFFINITYEX)(PCKAFFINITY_EX pAffinity); 3425 3429 typedef NTSTATUS (NTAPI *PFNKEGETPROCESSORNUMBERFROMINDEX)(KEPROCESSORINDEX idxProcessor, PPROCESSOR_NUMBER pProcNumber); … … 3441 3445 typedef LOGICAL (NTAPI *PFNKESHOULDYIELDPROCESSOR)(void); 3442 3446 3443 NTSYSAPI BOOLEAN NTAPIObFindHandleForObject(PEPROCESS pProcess, PVOID pvObject, POBJECT_TYPE pObjectType,3447 RT_DECL_NTAPI(BOOLEAN) ObFindHandleForObject(PEPROCESS pProcess, PVOID pvObject, POBJECT_TYPE pObjectType, 3444 3448 PVOID pvOptionalConditions, PHANDLE phFound); 3445 NTSYSAPI NTSTATUS NTAPIObReferenceObjectByName(PUNICODE_STRING pObjectPath, ULONG fAttributes, PACCESS_STATE pAccessState,3449 RT_DECL_NTAPI(NTSTATUS) ObReferenceObjectByName(PUNICODE_STRING pObjectPath, ULONG fAttributes, PACCESS_STATE pAccessState, 3446 3450 ACCESS_MASK fDesiredAccess, POBJECT_TYPE pObjectType, 3447 3451 KPROCESSOR_MODE enmAccessMode, PVOID pvParseContext, PVOID *ppvObject); 3448 NTSYSAPI HANDLE NTAPIPsGetProcessInheritedFromUniqueProcessId(PEPROCESS);3449 NTSYSAPI UCHAR * NTAPIPsGetProcessImageFileName(PEPROCESS);3450 NTSYSAPI BOOLEAN NTAPIPsIsProcessBeingDebugged(PEPROCESS);3451 NTSYSAPI ULONG NTAPIPsGetProcessSessionId(PEPROCESS);3452 RT_DECL_NTAPI(HANDLE) PsGetProcessInheritedFromUniqueProcessId(PEPROCESS); 3453 RT_DECL_NTAPI(UCHAR *) PsGetProcessImageFileName(PEPROCESS); 3454 RT_DECL_NTAPI(BOOLEAN) PsIsProcessBeingDebugged(PEPROCESS); 3455 RT_DECL_NTAPI(ULONG) PsGetProcessSessionId(PEPROCESS); 3452 3456 extern DECLIMPORT(POBJECT_TYPE *) LpcPortObjectType; /**< In vista+ this is the ALPC port object type. */ 3453 3457 extern DECLIMPORT(POBJECT_TYPE *) LpcWaitablePortObjectType; /**< In vista+ this is the ALPC port object type. */ … … 3480 3484 #define CSR_MSG_NO_CREATED_PROCESS UINT32_C(0x10000) 3481 3485 #define CSR_MSG_NO_CREATED_THREAD UINT32_C(0x10001) 3482 NTSYSAPI NTSTATUS NTAPICsrClientCallServer(PVOID, PVOID, ULONG, SIZE_T);3483 #endif 3484 3485 NTSYSAPI VOID NTAPILdrInitializeThunk(PVOID, PVOID, PVOID);3486 RT_DECL_NTAPI(NTSTATUS) CsrClientCallServer(PVOID, PVOID, ULONG, SIZE_T); 3487 #endif 3488 3489 RT_DECL_NTAPI(VOID) LdrInitializeThunk(PVOID, PVOID, PVOID); 3486 3490 3487 3491 typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA … … 3508 3512 #define LDR_DLL_NOTIFICATION_REASON_LOADED UINT32_C(1) 3509 3513 #define LDR_DLL_NOTIFICATION_REASON_UNLOADED UINT32_C(2) 3510 NTSYSAPI NTSTATUS NTAPILdrRegisterDllNotification(ULONG fFlags, PLDR_DLL_NOTIFICATION_FUNCTION pfnCallback, PVOID pvUser,3514 RT_DECL_NTAPI(NTSTATUS) LdrRegisterDllNotification(ULONG fFlags, PLDR_DLL_NOTIFICATION_FUNCTION pfnCallback, PVOID pvUser, 3511 3515 PVOID *pvCookie); 3512 3516 typedef NTSTATUS (NTAPI *PFNLDRREGISTERDLLNOTIFICATION)(ULONG, PLDR_DLL_NOTIFICATION_FUNCTION, PVOID, PVOID *); 3513 NTSYSAPI NTSTATUS NTAPILdrUnregisterDllNotification(PVOID pvCookie);3517 RT_DECL_NTAPI(NTSTATUS) LdrUnregisterDllNotification(PVOID pvCookie); 3514 3518 typedef NTSTATUS (NTAPI *PFNLDRUNREGISTERDLLNOTIFICATION)(PVOID); 3515 3519 3516 NTSYSAPI NTSTATUS NTAPILdrLoadDll(IN PWSTR pwszSearchPathOrFlags OPTIONAL, IN PULONG pfFlags OPTIONAL,3520 RT_DECL_NTAPI(NTSTATUS) LdrLoadDll(IN PWSTR pwszSearchPathOrFlags OPTIONAL, IN PULONG pfFlags OPTIONAL, 3517 3521 IN PCUNICODE_STRING pName, OUT PHANDLE phMod); 3518 3522 typedef NTSTATUS (NTAPI *PFNLDRLOADDLL)(IN PWSTR pwszSearchPathOrFlags OPTIONAL, IN PULONG pfFlags OPTIONAL, 3519 3523 IN PCUNICODE_STRING pName, OUT PHANDLE phMod); 3520 NTSYSAPI NTSTATUS NTAPILdrUnloadDll(IN HANDLE hMod);3524 RT_DECL_NTAPI(NTSTATUS) LdrUnloadDll(IN HANDLE hMod); 3521 3525 typedef NTSTATUS (NTAPI *PFNLDRUNLOADDLL)(IN HANDLE hMod); 3522 NTSYSAPI NTSTATUS NTAPILdrGetDllHandle(IN PCWSTR pwszDllPath OPTIONAL, IN PULONG pfFlags OPTIONAL,3526 RT_DECL_NTAPI(NTSTATUS) LdrGetDllHandle(IN PCWSTR pwszDllPath OPTIONAL, IN PULONG pfFlags OPTIONAL, 3523 3527 IN PCUNICODE_STRING pName, OUT PHANDLE phDll); 3524 3528 typedef NTSTATUS (NTAPI *PFNLDRGETDLLHANDLE)(IN PCWSTR pwszDllPath OPTIONAL, IN PULONG pfFlags OPTIONAL, … … 3527 3531 #define LDRGETDLLHANDLEEX_F_PIN RT_BIT_32(1) 3528 3532 /** @since Windows XP. */ 3529 NTSYSAPI NTSTATUS NTAPILdrGetDllHandleEx(IN ULONG fFlags, IN PCWSTR pwszDllPath OPTIONAL, IN PULONG pfFlags OPTIONAL,3533 RT_DECL_NTAPI(NTSTATUS) LdrGetDllHandleEx(IN ULONG fFlags, IN PCWSTR pwszDllPath OPTIONAL, IN PULONG pfFlags OPTIONAL, 3530 3534 IN PCUNICODE_STRING pName, OUT PHANDLE phDll); 3531 3535 /** @since Windows XP. */ … … 3533 3537 IN PCUNICODE_STRING pName, OUT PHANDLE phDll); 3534 3538 /** @since Windows 7. */ 3535 NTSYSAPI NTSTATUS NTAPILdrGetDllHandleByMapping(IN PVOID pvBase, OUT PHANDLE phDll);3539 RT_DECL_NTAPI(NTSTATUS) LdrGetDllHandleByMapping(IN PVOID pvBase, OUT PHANDLE phDll); 3536 3540 /** @since Windows 7. */ 3537 3541 typedef NTSTATUS (NTAPI *PFNLDRGETDLLHANDLEBYMAPPING)(IN PVOID pvBase, OUT PHANDLE phDll); 3538 3542 /** @since Windows 7. */ 3539 NTSYSAPI NTSTATUS NTAPILdrGetDllHandleByName(IN PCUNICODE_STRING pName OPTIONAL, IN PCUNICODE_STRING pFullName OPTIONAL,3543 RT_DECL_NTAPI(NTSTATUS) LdrGetDllHandleByName(IN PCUNICODE_STRING pName OPTIONAL, IN PCUNICODE_STRING pFullName OPTIONAL, 3540 3544 OUT PHANDLE phDll); 3541 3545 /** @since Windows 7. */ … … 3543 3547 OUT PHANDLE phDll); 3544 3548 #define LDRADDREFDLL_F_PIN RT_BIT_32(0) 3545 NTSYSAPI NTSTATUS NTAPILdrAddRefDll(IN ULONG fFlags, IN HANDLE hDll);3549 RT_DECL_NTAPI(NTSTATUS) LdrAddRefDll(IN ULONG fFlags, IN HANDLE hDll); 3546 3550 typedef NTSTATUS (NTAPI *PFNLDRADDREFDLL)(IN ULONG fFlags, IN HANDLE hDll); 3547 NTSYSAPI NTSTATUS NTAPILdrGetProcedureAddress(IN HANDLE hDll, IN ANSI_STRING const *pSymbol OPTIONAL,3551 RT_DECL_NTAPI(NTSTATUS) LdrGetProcedureAddress(IN HANDLE hDll, IN ANSI_STRING const *pSymbol OPTIONAL, 3548 3552 IN ULONG uOrdinal OPTIONAL, OUT PVOID *ppvSymbol); 3549 3553 typedef NTSTATUS (NTAPI *PFNLDRGETPROCEDUREADDRESS)(IN HANDLE hDll, IN PCANSI_STRING pSymbol OPTIONAL, … … 3551 3555 #define LDRGETPROCEDUREADDRESSEX_F_DONT_RECORD_FORWARDER RT_BIT_32(0) 3552 3556 /** @since Windows Vista. */ 3553 NTSYSAPI NTSTATUS NTAPILdrGetProcedureAddressEx(IN HANDLE hDll, IN ANSI_STRING const *pSymbol OPTIONAL,3557 RT_DECL_NTAPI(NTSTATUS) LdrGetProcedureAddressEx(IN HANDLE hDll, IN ANSI_STRING const *pSymbol OPTIONAL, 3554 3558 IN ULONG uOrdinal OPTIONAL, OUT PVOID *ppvSymbol, ULONG fFlags); 3555 3559 /** @since Windows Vista. */ … … 3562 3566 #define LDRLOCKLOADERLOCK_DISP_NOT_ACQUIRED UINT32_C(2) 3563 3567 /** @since Windows XP. */ 3564 NTSYSAPI NTSTATUS NTAPILdrLockLoaderLock(IN ULONG fFlags, OUT PULONG puDisposition OPTIONAL, OUT PVOID *ppvCookie);3568 RT_DECL_NTAPI(NTSTATUS) LdrLockLoaderLock(IN ULONG fFlags, OUT PULONG puDisposition OPTIONAL, OUT PVOID *ppvCookie); 3565 3569 /** @since Windows XP. */ 3566 3570 typedef NTSTATUS (NTAPI *PFNLDRLOCKLOADERLOCK)(IN ULONG fFlags, OUT PULONG puDisposition OPTIONAL, OUT PVOID *ppvCookie); 3567 3571 #define LDRUNLOCKLOADERLOCK_F_RAISE_ERRORS RT_BIT_32(0) 3568 3572 /** @since Windows XP. */ 3569 NTSYSAPI NTSTATUS NTAPILdrUnlockLoaderLock(IN ULONG fFlags, OUT PVOID pvCookie);3573 RT_DECL_NTAPI(NTSTATUS) LdrUnlockLoaderLock(IN ULONG fFlags, OUT PVOID pvCookie); 3570 3574 /** @since Windows XP. */ 3571 3575 typedef NTSTATUS (NTAPI *PFNLDRUNLOCKLOADERLOCK)(IN ULONG fFlags, OUT PVOID pvCookie); 3572 3576 3573 NTSYSAPI NTSTATUS NTAPIRtlExpandEnvironmentStrings_U(PVOID, PUNICODE_STRING, PUNICODE_STRING, PULONG);3574 NTSYSAPI VOID NTAPIRtlExitUserProcess(NTSTATUS rcExitCode); /**< Vista and later. */3575 NTSYSAPI VOID NTAPIRtlExitUserThread(NTSTATUS rcExitCode);3576 NTSYSAPI NTSTATUS NTAPIRtlDosApplyFileIsolationRedirection_Ustr(IN ULONG fFlags,3577 RT_DECL_NTAPI(NTSTATUS) RtlExpandEnvironmentStrings_U(PVOID, PUNICODE_STRING, PUNICODE_STRING, PULONG); 3578 RT_DECL_NTAPI(VOID) RtlExitUserProcess(NTSTATUS rcExitCode); /**< Vista and later. */ 3579 RT_DECL_NTAPI(VOID) RtlExitUserThread(NTSTATUS rcExitCode); 3580 RT_DECL_NTAPI(NTSTATUS) RtlDosApplyFileIsolationRedirection_Ustr(IN ULONG fFlags, 3577 3581 IN PCUNICODE_STRING pOrgName, 3578 3582 IN PUNICODE_STRING pDefaultSuffix, … … 3585 3589 /** @since Windows 8. 3586 3590 * @note Status code is always zero in windows 10 build 14393. */ 3587 NTSYSAPI NTSTATUS NTAPIApiSetQueryApiSetPresence(IN PCUNICODE_STRING pAllegedApiSetDll, OUT PBOOLEAN pfPresent);3591 RT_DECL_NTAPI(NTSTATUS) ApiSetQueryApiSetPresence(IN PCUNICODE_STRING pAllegedApiSetDll, OUT PBOOLEAN pfPresent); 3588 3592 /** @copydoc ApiSetQueryApiSetPresence */ 3589 3593 typedef NTSTATUS (NTAPI *PFNAPISETQUERYAPISETPRESENCE)(IN PCUNICODE_STRING pAllegedApiSetDll, OUT PBOOLEAN pfPresent); … … 3608 3612 } RTL_HEAP_PARAMETERS; 3609 3613 typedef RTL_HEAP_PARAMETERS *PRTL_HEAP_PARAMETERS; 3610 NTSYSAPI PVOID NTAPIRtlCreateHeap(ULONG fFlags, PVOID pvHeapBase, SIZE_T cbReserve, SIZE_T cbCommit, PVOID pvLock,3614 RT_DECL_NTAPI(PVOID) RtlCreateHeap(ULONG fFlags, PVOID pvHeapBase, SIZE_T cbReserve, SIZE_T cbCommit, PVOID pvLock, 3611 3615 PRTL_HEAP_PARAMETERS pParameters); 3612 3616 /** @name Heap flags (for RtlCreateHeap). … … 3661 3665 # define HEAP_TAG_MASK (HEAP_MAXIMUM_TAG << HEAP_TAG_SHIFT) 3662 3666 /** @} */ 3663 NTSYSAPI PVOID NTAPIRtlAllocateHeap(HANDLE hHeap, ULONG fFlags, SIZE_T cb);3664 NTSYSAPI PVOID NTAPIRtlReAllocateHeap(HANDLE hHeap, ULONG fFlags, PVOID pvOld, SIZE_T cbNew);3665 NTSYSAPI BOOLEAN NTAPIRtlFreeHeap(HANDLE hHeap, ULONG fFlags, PVOID pvMem);3667 RT_DECL_NTAPI(PVOID) RtlAllocateHeap(HANDLE hHeap, ULONG fFlags, SIZE_T cb); 3668 RT_DECL_NTAPI(PVOID) RtlReAllocateHeap(HANDLE hHeap, ULONG fFlags, PVOID pvOld, SIZE_T cbNew); 3669 RT_DECL_NTAPI(BOOLEAN) RtlFreeHeap(HANDLE hHeap, ULONG fFlags, PVOID pvMem); 3666 3670 # endif /* IPRT_NT_USE_WINTERNL */ 3667 NTSYSAPI SIZE_T NTAPIRtlCompactHeap(HANDLE hHeap, ULONG fFlags);3668 NTSYSAPI VOID NTAPIRtlFreeUnicodeString(PUNICODE_STRING);3669 NTSYSAPI SIZE_T NTAPIRtlSizeHeap(HANDLE hHeap, ULONG fFlags, PVOID pvMem);3670 NTSYSAPI NTSTATUS NTAPIRtlGetLastNtStatus(VOID);3671 NTSYSAPI ULONG NTAPIRtlGetLastWin32Error(VOID);3672 NTSYSAPI VOID NTAPIRtlSetLastWin32Error(ULONG uError);3673 NTSYSAPI VOID NTAPIRtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS rcNt);3674 NTSYSAPI VOID NTAPIRtlRestoreLastWin32Error(ULONG uError);3675 NTSYSAPI BOOLEAN NTAPIRtlQueryPerformanceCounter(PLARGE_INTEGER);3676 NTSYSAPI uint64_t NTAPIRtlGetSystemTimePrecise(VOID);3671 RT_DECL_NTAPI(SIZE_T) RtlCompactHeap(HANDLE hHeap, ULONG fFlags); 3672 RT_DECL_NTAPI(VOID) RtlFreeUnicodeString(PUNICODE_STRING); 3673 RT_DECL_NTAPI(SIZE_T) RtlSizeHeap(HANDLE hHeap, ULONG fFlags, PVOID pvMem); 3674 RT_DECL_NTAPI(NTSTATUS) RtlGetLastNtStatus(VOID); 3675 RT_DECL_NTAPI(ULONG) RtlGetLastWin32Error(VOID); 3676 RT_DECL_NTAPI(VOID) RtlSetLastWin32Error(ULONG uError); 3677 RT_DECL_NTAPI(VOID) RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS rcNt); 3678 RT_DECL_NTAPI(VOID) RtlRestoreLastWin32Error(ULONG uError); 3679 RT_DECL_NTAPI(BOOLEAN) RtlQueryPerformanceCounter(PLARGE_INTEGER); 3680 RT_DECL_NTAPI(uint64_t) RtlGetSystemTimePrecise(VOID); 3677 3681 typedef uint64_t (NTAPI * PFNRTLGETSYSTEMTIMEPRECISE)(VOID); 3678 NTSYSAPI uint64_t NTAPIRtlGetInterruptTimePrecise(uint64_t *puPerfTime);3682 RT_DECL_NTAPI(uint64_t) RtlGetInterruptTimePrecise(uint64_t *puPerfTime); 3679 3683 typedef uint64_t (NTAPI * PFNRTLGETINTERRUPTTIMEPRECISE)(uint64_t *); 3680 NTSYSAPI BOOLEAN NTAPIRtlQueryUnbiasedInterruptTime(uint64_t *puInterruptTime);3684 RT_DECL_NTAPI(BOOLEAN) RtlQueryUnbiasedInterruptTime(uint64_t *puInterruptTime); 3681 3685 typedef BOOLEAN (NTAPI * PFNRTLQUERYUNBIASEDINTERRUPTTIME)(uint64_t *); 3682 3686
Note:
See TracChangeset
for help on using the changeset viewer.