diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-09-10 16:55:32 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-10-09 13:37:08 +0200 |
commit | 40df30d258ebfd24a447fababc649867c24513d8 (patch) | |
tree | e29c3abaac640eb1cfe951cae4ce4fe6896c8029 /win/rfb_win32/CleanDesktop.cxx | |
parent | 56b3460aa318b650f12833ba119fa6decb930148 (diff) | |
download | tigervnc-40df30d258ebfd24a447fababc649867c24513d8.tar.gz tigervnc-40df30d258ebfd24a447fababc649867c24513d8.zip |
Split SystemException to handle Windows
Windows has (at least) two error namespaces, both errno and
GetLastResult(). These overlap, so it is important we keep track of
which one we are dealing with.
To make things extra problematic, the BSD socket API normally uses
errno, but on Windows it has been mapped in to the GetLastResult()
namespace.
Try to keep better control of this by using separate classes for the
namespaces.
Diffstat (limited to 'win/rfb_win32/CleanDesktop.cxx')
-rw-r--r-- | win/rfb_win32/CleanDesktop.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win/rfb_win32/CleanDesktop.cxx b/win/rfb_win32/CleanDesktop.cxx index d2d6d2d1..6d933b22 100644 --- a/win/rfb_win32/CleanDesktop.cxx +++ b/win/rfb_win32/CleanDesktop.cxx @@ -45,7 +45,7 @@ struct ActiveDesktop { HRESULT result = CoCreateInstance(CLSID_ActiveDesktop, nullptr, CLSCTX_INPROC_SERVER, IID_IActiveDesktop, (PVOID*)&handle); if (result != S_OK) - throw rdr::SystemException("failed to contact Active Desktop", result); + throw rdr::Win32Exception("failed to contact Active Desktop", HRESULT_CODE(result)); } ~ActiveDesktop() { if (handle) |