aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwsoltys <wiso@no.way>2013-04-26 19:45:31 +0200
committerwsoltys <wiso@no.way>2013-04-26 19:45:31 +0200
commit555cf97cbe3d94332e3d28a765c49539b8e4a41c (patch)
tree6735c95e1e6e8e8c3ecc69cdef336319e21ab6f6
parentf3229d4e628c0bbe9cf4ce8d30f397fd697957ab (diff)
[WIN32] fixed: use wide string methods to create the dump file and the stacktrace.
-rw-r--r--xbmc/threads/platform/win/Win32Exception.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/xbmc/threads/platform/win/Win32Exception.cpp b/xbmc/threads/platform/win/Win32Exception.cpp
index a709244c9f..756b42eb3a 100644
--- a/xbmc/threads/platform/win/Win32Exception.cpp
+++ b/xbmc/threads/platform/win/Win32Exception.cpp
@@ -24,6 +24,7 @@
#include "Util.h"
#include "WIN32Util.h"
#include "utils/StringUtils.h"
+#include "utils/CharsetConverter.h"
#define LOG if(logger) logger->Log
@@ -115,6 +116,7 @@ bool win32_exception::write_minidump(EXCEPTION_POINTERS* pEp)
// Create the dump file where the xbmc.exe resides
bool returncode = false;
CStdString dumpFileName;
+ CStdStringW dumpFileNameW;
SYSTEMTIME stLocalTime;
GetLocalTime(&stLocalTime);
@@ -125,7 +127,8 @@ bool win32_exception::write_minidump(EXCEPTION_POINTERS* pEp)
dumpFileName.Format("%s\\%s", CWIN32Util::GetProfilePath().c_str(), CUtil::MakeLegalFileName(dumpFileName));
- HANDLE hDumpFile = CreateFile(dumpFileName.c_str(), GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0);
+ g_charsetConverter.utf8ToW(dumpFileName, dumpFileNameW, false);
+ HANDLE hDumpFile = CreateFileW(dumpFileNameW.c_str(), GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0);
if (hDumpFile == INVALID_HANDLE_VALUE)
{
@@ -186,6 +189,7 @@ bool win32_exception::write_stacktrace(EXCEPTION_POINTERS* pEp)
#define STACKWALK_MAX_NAMELEN 1024
std::string dumpFileName, strOutput;
+ CStdStringW dumpFileNameW;
CHAR cTemp[STACKWALK_MAX_NAMELEN];
DWORD dwBytes;
SYSTEMTIME stLocalTime;
@@ -223,7 +227,8 @@ bool win32_exception::write_stacktrace(EXCEPTION_POINTERS* pEp)
dumpFileName = StringUtils::Format("%s\\%s", CWIN32Util::GetProfilePath().c_str(), CUtil::MakeLegalFileName(dumpFileName));
- HANDLE hDumpFile = CreateFile(dumpFileName.c_str(), GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0);
+ g_charsetConverter.utf8ToW(dumpFileName, dumpFileNameW, false);
+ HANDLE hDumpFile = CreateFileW(dumpFileNameW.c_str(), GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0);
if (hDumpFile == INVALID_HANDLE_VALUE)
{