From a4623644098f14532efd41edb89633565c4038ce Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sat, 28 Jan 2017 12:51:48 +0300 Subject: [PATCH] Use more functions from boost::detail::winapi rather than from global namespace --- include/boost/stacktrace/detail/frame_msvc.ipp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/stacktrace/detail/frame_msvc.ipp b/include/boost/stacktrace/detail/frame_msvc.ipp index e79a411..1349184 100644 --- a/include/boost/stacktrace/detail/frame_msvc.ipp +++ b/include/boost/stacktrace/detail/frame_msvc.ipp @@ -21,6 +21,7 @@ #include "Dbgeng.h" #include +#include #pragma comment(lib, "ole32.lib") #pragma comment(lib, "Dbgeng.lib") @@ -247,7 +248,7 @@ std::size_t this_thread_frames::collect(void** memory, std::size_t size) BOOST_N } std::size_t dump(void* fd, void** memory, std::size_t mem_size) BOOST_NOEXCEPT { - if (!::WriteFile(fd, memory, sizeof(void*) * mem_size, 0, 0)) { + if (!boost::detail::winapi::WriteFile(fd, memory, static_cast(sizeof(void*) * mem_size), 0, 0)) { return 0; } @@ -255,7 +256,7 @@ std::size_t dump(void* fd, void** memory, std::size_t mem_size) BOOST_NOEXCEPT { } std::size_t dump(const char* file, void** memory, std::size_t mem_size) BOOST_NOEXCEPT { - void* const fd = ::CreateFile(file, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); + void* const fd = boost::detail::winapi::CreateFileA(file, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if (fd == INVALID_HANDLE_VALUE) { return 0; }