Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:02:28

0001 /*
0002  * Copyright 2017 Andrey Semashev
0003  *
0004  * Distributed under the Boost Software License, Version 1.0.
0005  * See http://www.boost.org/LICENSE_1_0.txt
0006  */
0007 
0008 #ifndef BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
0009 #define BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
0010 
0011 #include <boost/winapi/basic_types.hpp>
0012 #include <boost/winapi/config.hpp>
0013 
0014 #ifdef BOOST_HAS_PRAGMA_ONCE
0015 #pragma once
0016 #endif
0017 
0018 // MinGW does not provide RtlCaptureStackBackTrace
0019 #if !defined( BOOST_WINAPI_IS_MINGW )
0020 
0021 // Note: RtlCaptureStackBackTrace is available in WinXP SP1 and later
0022 #if (BOOST_USE_NTDDI_VERSION > BOOST_WINAPI_NTDDI_WINXP)
0023 
0024 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
0025 
0026 #include <boost/winapi/detail/header.hpp>
0027 
0028 // Windows SDK shipped with MSVC 7.1 and 8 does not declare RtlCaptureStackBackTrace in headers but allows to link with it
0029 #if !defined( BOOST_USE_WINDOWS_H ) || (defined(_MSC_VER) && (_MSC_VER+0) < 1500)
0030 extern "C" {
0031 
0032 BOOST_WINAPI_IMPORT boost::winapi::WORD_
0033 BOOST_WINAPI_NTAPI_CC RtlCaptureStackBackTrace(
0034     boost::winapi::DWORD_ FramesToSkip,
0035     boost::winapi::DWORD_ FramesToCapture,
0036     boost::winapi::PVOID_* BackTrace,
0037     boost::winapi::PDWORD_ BackTraceHash);
0038 
0039 } // extern "C"
0040 #endif
0041 
0042 namespace boost {
0043 namespace winapi {
0044 
0045 using ::RtlCaptureStackBackTrace;
0046 
0047 }
0048 }
0049 
0050 #include <boost/winapi/detail/footer.hpp>
0051 
0052 #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
0053 #endif // (BOOST_USE_NTDDI_VERSION > BOOST_WINAPI_NTDDI_WINXP)
0054 #endif // !defined( BOOST_WINAPI_IS_MINGW )
0055 #endif // BOOST_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_