From 41745326d8440340a87b5179139b2915efe3715d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 18 Jul 2022 03:03:56 +0200 Subject: Add Unicode support to Win32Error. --- c/common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'c/common.h') diff --git a/c/common.h b/c/common.h index 515c75c..2b3c331 100644 --- a/c/common.h +++ b/c/common.h @@ -16,9 +16,11 @@ struct Win32Error : public std::exception Win32Error(DWORD dwErr); ~Win32Error(); virtual const char* what() const noexcept override; + virtual const TCHAR* twhat() const noexcept; private: DWORD m_dwErr; - char* const m_szMsg = NULL; + char* m_szMsg = NULL; + wchar_t* m_wszMsg = NULL; }; struct Library -- cgit v1.2.3