From 8566655b85f0a4e515d57f6686636db516116f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 22 Aug 2022 13:13:10 +0200 Subject: Improve Win32Error, add Min. --- c/win.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'c/win.h') diff --git a/c/win.h b/c/win.h index 06de198..26a21b2 100644 --- a/c/win.h +++ b/c/win.h @@ -25,12 +25,13 @@ struct WideException : public std::exception /* Exception for Windows API errors. */ struct Win32Error : public WideException { - Win32Error(DWORD code = GetLastError()) noexcept; + Win32Error(DWORD code = GetLastError(), HMODULE hModule = nullptr) noexcept; ~Win32Error() noexcept; const char* what() const noexcept override; const wchar_t* What() const noexcept override; DWORD code; private: + HMODULE hModule; char* m_szMsg = nullptr; wchar_t* m_wszMsg = nullptr; }; -- cgit v1.2.3