2 * Copyright 2017 Andrey Semashev
4 * Distributed under the Boost Software License, Version 1.0.
5 * See http://www.boost.org/LICENSE_1_0.txt
8 #ifndef BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
9 #define BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
11 #include <boost/winapi/basic_types.hpp>
12 #include <boost/winapi/config.hpp>
14 #ifdef BOOST_HAS_PRAGMA_ONCE
18 // MinGW does not provide RtlCaptureStackBackTrace
19 #if !defined( BOOST_WINAPI_IS_MINGW )
21 // Note: RtlCaptureStackBackTrace is available in WinXP SP1 and later
22 #if (BOOST_USE_NTDDI_VERSION > BOOST_WINAPI_NTDDI_WINXP)
24 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
26 // Windows SDK shipped with MSVC 7.1 and 8 does not declare RtlCaptureStackBackTrace in headers but allows to link with it
27 #if !defined( BOOST_USE_WINDOWS_H ) || (defined(_MSC_VER) && (_MSC_VER+0) < 1500)
30 BOOST_SYMBOL_IMPORT boost::winapi::WORD_
31 BOOST_WINAPI_NTAPI_CC RtlCaptureStackBackTrace(
32 boost::winapi::DWORD_ FramesToSkip,
33 boost::winapi::DWORD_ FramesToCapture,
34 boost::winapi::PVOID_* BackTrace,
35 boost::winapi::PDWORD_ BackTraceHash);
43 using ::RtlCaptureStackBackTrace;
48 #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
49 #endif // (BOOST_USE_NTDDI_VERSION > BOOST_WINAPI_NTDDI_WINXP)
50 #endif // !defined( BOOST_WINAPI_IS_MINGW )
51 #endif // BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_