Giter VIP home page Giter VIP logo

Comments (4)

Lastique avatar Lastique commented on June 10, 2024
  1. What Windows SDK and compiler are you using?
  2. 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.

Riadela avatar Riadela commented on June 10, 2024

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.

Riadela avatar Riadela commented on June 10, 2024

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.

Lastique avatar Lastique commented on June 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.