Comments (4)
- What Windows SDK and compiler are you using?
- Can you identify the difference between Boost.WinAPI and Windows SDK declarations?
As a workaround you can define BOOST_USE_WINDOWS_H
when building your code to force Boost.WinAPI use windows.h
instead of declaring functions and types on its own.
from winapi.
I'm on SDK 10.0.17134 and using VS17 (msvc 141)
Yeah I can list a couple of them that I get as an error
get_last_error.hpp
BOOST_SYMBOL_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC GetLastError(BOOST_WINAPI_DETAIL_VOID);
errhandling.h (from my windows kits)
#ifndef _M_CEE_PURE
WINBASEAPI _Check_return_
_Post_equals_last_error_
DWORD
WINAPI
GetLastError(
VOID
);
#endif
Or in boost again in error_handling.hpp
BOOST_SYMBOL_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
FormatMessageA(
boost::winapi::DWORD_ dwFlags,
boost::winapi::LPCVOID_ lpSource,
boost::winapi::DWORD_ dwMessageId,
boost::winapi::DWORD_ dwLanguageId,
boost::winapi::LPSTR_ lpBuffer,
boost::winapi::DWORD_ nSize,
va_list *Arguments);
And in my sdk in WinBase.h
#if !defined(MIDL_PASS)
WINBASEAPI
_Success_(return != 0)
DWORD
WINAPI
FormatMessageA(
_In_ DWORD dwFlags,
_In_opt_ LPCVOID lpSource,
_In_ DWORD dwMessageId,
_In_ DWORD dwLanguageId,
_When_((dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) != 0, _At_((LPSTR*)lpBuffer, _Outptr_result_z_))
_When_((dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) == 0, _Out_writes_z_(nSize))
LPSTR lpBuffer,
_In_ DWORD nSize,
_In_opt_ va_list *Arguments
);
2>c:\thirdparty\source\boost\boost_1_71_0\boost\winapi\error_handling.hpp(25): error C28251: Inconsistent annotation for 'FormatMessageA': this instance has no annotations. See c:\program files (x86)\windows kits\10\include\10.0.17134.0\um\winbase.h(2387).
from winapi.
I also get this unusual warning .. which it seems I'm the only one in the web
c:\thirdparty\source\boost\boost_1_71_0\boost\math\special_functions\next.hpp(502): error C6031: Return value ignored: 'frexp'.
from winapi.
The math one is not related to Boost.WinAPI. You can report it to Boost.Math.
The other warnings seem to be caused by returned value and argument check attributes. I won't be adding those because different Windows SDKs use different markup for those. I recommend you disabling the warning. I'll probably disable it in the future with a pragma.
from winapi.
Related Issues (20)
- Defines min and max macros on Windows that conflict with standard C++ HOT 9
- incompatibilty with ISOLATION_AWARE_ENABLED HOT 1
- Cygwin 64 issue HOT 4
- warning on anonymous struct HOT 1
- warning on duplicate macro definitions HOT 1
- Windows CE 7.0 and Windows Mobile 6.0 do not always dllimport WINAPI functions HOT 5
- BOOST_INTERLOCKED_EXCHANGE_ADD doesn't work with clang(-cl) HOT 6
- STRICT macro defined in basic_types.hpp HOT 1
- Build Failure with Boost 1.68 Using GCC 8.2.1 and MinGW-w64 (Windows, _WIN32_WINNT=0xA00) HOT 1
- Compiling with MSVC for ARM64 emits warning C4302 (truncation from 'void *const ' to 'long')
- Missing #include sdkddkver.h before checking _WIN32_WINNT HOT 1
- basic_types.hpp includes <winerror.h> HOT 3
- Compile error when including boost\thread\win32\thread_data.hpp on win64 HOT 2
- clang-cl compilation error HOT 12
- Error C2467 when "Disable Language Extensions" is set to "Yes (/Za)" in MSVC 16.8 HOT 3
- Multiple Errors - C28251 in VS 2022 (17.0.3) - v143 HOT 1
- The Boost WINAPI partitioning scheme doesn't work for WINAPI_FAMILY_GAMES HOT 4
- Problem building 1.81.0 on MSVC 14.3 (VS2022 17.6.2) with sanitizer HOT 5
- CompareObjectHandles is not a member of global namespace HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winapi.