1 /* 2 * Copyright Andrey Semashev 2018. 3 * Distributed under the Boost Software License, Version 1.0. 4 * (See accompanying file LICENSE_1_0.txt or copy at 5 * http://www.boost.org/LICENSE_1_0.txt) 6 */ 7 /*! 8 * \file error_handling_abi.cpp 9 * \author Andrey Semashev 10 * \date 10.03.2018 11 * 12 * \brief This file contains ABI test for error_handling.hpp 13 */ 14 15 #include <boost/winapi/error_handling.hpp> 16 #include <windows.h> 17 #include "abi_test_tools.hpp" 18 main()19int main() 20 { 21 #if BOOST_WINAPI_PARTITION_APP_SYSTEM 22 BOOST_WINAPI_TEST_CONSTANT(FORMAT_MESSAGE_ALLOCATE_BUFFER); 23 #endif 24 25 BOOST_WINAPI_TEST_CONSTANT(FORMAT_MESSAGE_IGNORE_INSERTS); 26 BOOST_WINAPI_TEST_CONSTANT(FORMAT_MESSAGE_FROM_STRING); 27 BOOST_WINAPI_TEST_CONSTANT(FORMAT_MESSAGE_FROM_HMODULE); 28 BOOST_WINAPI_TEST_CONSTANT(FORMAT_MESSAGE_FROM_SYSTEM); 29 BOOST_WINAPI_TEST_CONSTANT(FORMAT_MESSAGE_ARGUMENT_ARRAY); 30 BOOST_WINAPI_TEST_CONSTANT(FORMAT_MESSAGE_MAX_WIDTH_MASK); 31 32 BOOST_WINAPI_TEST_CONSTANT(LANG_NEUTRAL); 33 BOOST_WINAPI_TEST_CONSTANT(LANG_INVARIANT); 34 35 BOOST_WINAPI_TEST_CONSTANT(SUBLANG_DEFAULT); 36 37 #if BOOST_WINAPI_PARTITION_DESKTOP 38 BOOST_WINAPI_TEST_CONSTANT(SEM_FAILCRITICALERRORS); 39 BOOST_WINAPI_TEST_CONSTANT(SEM_NOGPFAULTERRORBOX); 40 BOOST_WINAPI_TEST_CONSTANT(SEM_NOALIGNMENTFAULTEXCEPT); 41 BOOST_WINAPI_TEST_CONSTANT(SEM_NOOPENFILEERRORBOX); 42 #endif 43 44 BOOST_TEST_EQ(MAKELANGID(1, 2), boost::winapi::MAKELANGID_(1, 2)); 45 46 #if !defined(BOOST_NO_ANSI_APIS) 47 BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(FormatMessageA); 48 #endif 49 BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(FormatMessageW); 50 #if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM 51 BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(SetErrorMode); 52 #endif 53 54 return boost::report_errors(); 55 } 56