From d7a721ee0d6859847947f60911259e2c34b0d066 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 3 Sep 2020 13:21:02 +0200 Subject: [PATCH 1/2] Removed __kernel_entry usage from Nt* function typedefs, is is part of SAL annoations, not neccessary for proper signature --- .../boost/process/detail/windows/handle_workaround.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/process/detail/windows/handle_workaround.hpp b/include/boost/process/detail/windows/handle_workaround.hpp index a6414ae3f..c8ce8bccf 100644 --- a/include/boost/process/detail/windows/handle_workaround.hpp +++ b/include/boost/process/detail/windows/handle_workaround.hpp @@ -198,20 +198,20 @@ typedef struct _OBJECT_TYPE_INFORMATION_ { /* -__kernel_entry NTSTATUS NtQuerySystemInformation( +NTSTATUS NtQuerySystemInformation( IN SYSTEM_INFORMATION_CLASS SystemInformationClass, OUT PVOID SystemInformation, IN ULONG SystemInformationLength, OUT PULONG ReturnLength ); */ -typedef ::boost::winapi::NTSTATUS_ (__kernel_entry *nt_system_query_information_p )( +typedef ::boost::winapi::NTSTATUS_ (*nt_system_query_information_p )( SYSTEM_INFORMATION_CLASS_, void *, ::boost::winapi::ULONG_, ::boost::winapi::PULONG_); /* -__kernel_entry NTSYSCALLAPI NTSTATUS NtQueryObject( +NTSYSCALLAPI NTSTATUS NtQueryObject( HANDLE Handle, OBJECT_INFORMATION_CLASS ObjectInformationClass, PVOID ObjectInformation, @@ -220,7 +220,7 @@ __kernel_entry NTSYSCALLAPI NTSTATUS NtQueryObject( ); */ -typedef ::boost::winapi::NTSTATUS_ (__kernel_entry *nt_query_object_p )( +typedef ::boost::winapi::NTSTATUS_ (*nt_query_object_p )( ::boost::winapi::HANDLE_, OBJECT_INFORMATION_CLASS_, void *, From 642c2d369f64496f6d39a97c49a751addf1c4d90 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 3 Sep 2020 13:21:36 +0200 Subject: [PATCH 2/2] Use ::boost::winapi::DWORD_ instead of global DWORD --- include/boost/process/detail/windows/handles.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/process/detail/windows/handles.hpp b/include/boost/process/detail/windows/handles.hpp index 451c02fc4..7a93ac254 100644 --- a/include/boost/process/detail/windows/handles.hpp +++ b/include/boost/process/detail/windows/handles.hpp @@ -136,7 +136,7 @@ struct limit_handles_ : handler_base_ext [&](::boost::winapi::HANDLE_ handle) { auto itr = std::find(all_handles.begin(), all_handles .end(), handle); - DWORD flags = 0u; + ::boost::winapi::DWORD_ flags = 0u; if (itr != all_handles.end()) *itr = ::boost::winapi::INVALID_HANDLE_VALUE_; else if ((::boost::winapi::GetHandleInformation(*itr, &flags) != 0)