diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-09-19 23:44:10 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-09-19 23:44:10 +0300 |
commit | 3320b017f865b2a0d27b46c8a202ef41ee400160 (patch) | |
tree | fb1168738c7246e18cc28d649a7cc33748788305 /src | |
parent | fix GCC builds (diff) | |
download | winapi-debug-3320b017f865b2a0d27b46c8a202ef41ee400160.tar.gz winapi-debug-3320b017f865b2a0d27b46c8a202ef41ee400160.zip |
pdb::file: use wide WinAPI
Diffstat (limited to '')
-rw-r--r-- | src/utils/file.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/file.cpp b/src/utils/file.cpp index 4d7dd53..8380fe9 100644 --- a/src/utils/file.cpp +++ b/src/utils/file.cpp @@ -6,6 +6,7 @@ #include <pdb/all.hpp> #include <SafeInt.hpp> +#include <boost/nowide/convert.hpp> #include <windows.h> @@ -17,7 +18,7 @@ namespace pdb { namespace file { std::size_t get_size(const std::string& path) { - const Handle handle{CreateFileA(path.c_str(), + const Handle handle{CreateFileW(boost::nowide::widen(path).c_str(), FILE_READ_ATTRIBUTES, FILE_SHARE_READ, NULL, @@ -42,7 +43,7 @@ std::size_t get_size(const std::string& path) { } ID query_id(const std::string& path) { - const Handle handle{CreateFileA(path.c_str(), + const Handle handle{CreateFileW(boost::nowide::widen(path).c_str(), FILE_READ_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, |