diff options
Diffstat (limited to 'win/rfb_win32')
-rw-r--r-- | win/rfb_win32/CleanDesktop.cxx | 2 | ||||
-rw-r--r-- | win/rfb_win32/Clipboard.cxx | 6 | ||||
-rw-r--r-- | win/rfb_win32/DIBSectionBuffer.cxx | 4 | ||||
-rw-r--r-- | win/rfb_win32/DeviceContext.cxx | 10 | ||||
-rw-r--r-- | win/rfb_win32/DeviceFrameBuffer.cxx | 12 | ||||
-rw-r--r-- | win/rfb_win32/Dialog.cxx | 8 | ||||
-rw-r--r-- | win/rfb_win32/LaunchProcess.cxx | 4 | ||||
-rw-r--r-- | win/rfb_win32/MonitorInfo.cxx | 6 | ||||
-rw-r--r-- | win/rfb_win32/MsgWindow.cxx | 4 | ||||
-rw-r--r-- | win/rfb_win32/Registry.cxx | 8 | ||||
-rw-r--r-- | win/rfb_win32/SDisplay.cxx | 4 | ||||
-rw-r--r-- | win/rfb_win32/SDisplayCoreWMHooks.cxx | 2 | ||||
-rw-r--r-- | win/rfb_win32/Security.cxx | 4 | ||||
-rw-r--r-- | win/rfb_win32/WMPoller.cxx | 2 |
14 files changed, 38 insertions, 38 deletions
diff --git a/win/rfb_win32/CleanDesktop.cxx b/win/rfb_win32/CleanDesktop.cxx index 710c10f5..9713b2cd 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::win32_error("failed to contact Active Desktop", HRESULT_CODE(result)); + throw rdr::win32_error("Failed to contact Active Desktop", HRESULT_CODE(result)); } ~ActiveDesktop() { if (handle) diff --git a/win/rfb_win32/Clipboard.cxx b/win/rfb_win32/Clipboard.cxx index 2a2be1d5..8fdc79c8 100644 --- a/win/rfb_win32/Clipboard.cxx +++ b/win/rfb_win32/Clipboard.cxx @@ -129,7 +129,7 @@ Clipboard::setClipText(const char* text) { // - Firstly, we must open the clipboard if (!OpenClipboard(getHandle())) - throw rdr::win32_error("unable to open Win32 clipboard", GetLastError()); + throw rdr::win32_error("Unable to open Win32 clipboard", GetLastError()); // - Convert the supplied clipboard text into UTF-16 format with CRLF std::string filtered(convertCRLF(text)); @@ -144,11 +144,11 @@ Clipboard::setClipText(const char* text) { // - Next, we must clear out any existing data if (!EmptyClipboard()) - throw rdr::win32_error("unable to empty Win32 clipboard", GetLastError()); + throw rdr::win32_error("Unable to empty Win32 clipboard", GetLastError()); // - Set the new clipboard data if (!SetClipboardData(CF_UNICODETEXT, clip_handle)) - throw rdr::win32_error("unable to set Win32 clipboard", GetLastError()); + throw rdr::win32_error("Unable to set Win32 clipboard", GetLastError()); clip_handle = nullptr; vlog.debug("Set clipboard"); diff --git a/win/rfb_win32/DIBSectionBuffer.cxx b/win/rfb_win32/DIBSectionBuffer.cxx index e2cb15c1..3ce99809 100644 --- a/win/rfb_win32/DIBSectionBuffer.cxx +++ b/win/rfb_win32/DIBSectionBuffer.cxx @@ -58,7 +58,7 @@ void DIBSectionBuffer::initBuffer(const PixelFormat& pf, int w, int h) { uint8_t* new_data = nullptr; if (!pf.trueColour) - throw std::invalid_argument("palette format not supported"); + throw std::invalid_argument("Palette format not supported"); format = pf; @@ -87,7 +87,7 @@ void DIBSectionBuffer::initBuffer(const PixelFormat& pf, int w, int h) { if (!new_bitmap) { int err = GetLastError(); - throw rdr::win32_error("unable to create DIB section", err); + throw rdr::win32_error("Unable to create DIB section", err); } vlog.debug("recreateBuffer()"); diff --git a/win/rfb_win32/DeviceContext.cxx b/win/rfb_win32/DeviceContext.cxx index 353ee716..092279fb 100644 --- a/win/rfb_win32/DeviceContext.cxx +++ b/win/rfb_win32/DeviceContext.cxx @@ -51,10 +51,10 @@ PixelFormat DeviceContext::getPF(HDC dc) { bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bi.bmiHeader.biBitCount = 0; if (!::GetDIBits(dc, bitmap, 0, 1, nullptr, (BITMAPINFO*)&bi, DIB_RGB_COLORS)) { - throw rdr::win32_error("unable to determine device pixel format", GetLastError()); + throw rdr::win32_error("Unable to determine device pixel format", GetLastError()); } if (!::GetDIBits(dc, bitmap, 0, 1, nullptr, (BITMAPINFO*)&bi, DIB_RGB_COLORS)) { - throw rdr::win32_error("unable to determine pixel shifts/palette", GetLastError()); + throw rdr::win32_error("Unable to determine pixel shifts/palette", GetLastError()); } // Set the initial format information @@ -87,7 +87,7 @@ PixelFormat DeviceContext::getPF(HDC dc) { break; default: vlog.error("Bits per pixel %u not supported", bi.bmiHeader.biBitCount); - throw std::invalid_argument("unknown bits per pixel specified"); + throw std::invalid_argument("Unknown bits per pixel specified"); }; break; case BI_BITFIELDS: @@ -115,7 +115,7 @@ PixelFormat DeviceContext::getPF(HDC dc) { // Check that the depth & bpp are valid if (depth > bpp) { - vlog.error("depth exceeds bits per pixel!"); + vlog.error("Depth exceeds bits per pixel!"); bpp = depth; } @@ -159,7 +159,7 @@ Rect DeviceContext::getClipBox(HDC dc) { DeviceDC::DeviceDC(const char* deviceName) { dc = ::CreateDC("DISPLAY", deviceName, nullptr, nullptr); if (!dc) - throw rdr::win32_error("failed to create DeviceDC", GetLastError()); + throw rdr::win32_error("Failed to create DeviceDC", GetLastError()); } DeviceDC::~DeviceDC() { diff --git a/win/rfb_win32/DeviceFrameBuffer.cxx b/win/rfb_win32/DeviceFrameBuffer.cxx index 6e38d6a8..9d215041 100644 --- a/win/rfb_win32/DeviceFrameBuffer.cxx +++ b/win/rfb_win32/DeviceFrameBuffer.cxx @@ -54,14 +54,14 @@ DeviceFrameBuffer::DeviceFrameBuffer(HDC deviceContext, const Rect& wRect) int capabilities = GetDeviceCaps(device, RASTERCAPS); if (!(capabilities & RC_BITBLT)) { - throw std::invalid_argument("device does not support BitBlt"); + throw std::invalid_argument("Device does not support BitBlt"); } if (!(capabilities & RC_DI_BITMAP)) { - throw std::invalid_argument("device does not support GetDIBits"); + throw std::invalid_argument("Device does not support GetDIBits"); } /* if (GetDeviceCaps(device, PLANES) != 1) { - throw std::invalid_argument("device does not support planar displays"); + throw std::invalid_argument("Device does not support planar displays"); } */ @@ -140,9 +140,9 @@ void DeviceFrameBuffer::setCursor(HCURSOR hCursor, VNCServer* server) if (!GetObject(iconInfo.hbmMask, sizeof(BITMAP), &maskInfo)) throw rdr::win32_error("GetObject() failed", GetLastError()); if (maskInfo.bmPlanes != 1) - throw std::invalid_argument("unsupported multi-plane cursor"); + throw std::invalid_argument("Unsupported multi-plane cursor"); if (maskInfo.bmBitsPixel != 1) - throw std::invalid_argument("unsupported cursor mask format"); + throw std::invalid_argument("Unsupported cursor mask format"); width = maskInfo.bmWidth; height = maskInfo.bmHeight; @@ -188,7 +188,7 @@ void DeviceFrameBuffer::setCursor(HCURSOR hCursor, VNCServer* server) if ((bi.bV5RedMask != ((unsigned)0xff << ridx*8)) || (bi.bV5GreenMask != ((unsigned)0xff << gidx*8)) || (bi.bV5BlueMask != ((unsigned)0xff << bidx*8))) - throw std::invalid_argument("unsupported cursor colour format"); + throw std::invalid_argument("Unsupported cursor colour format"); uint8_t* rwbuffer = buffer.data(); for (int y = 0; y < height; y++) { diff --git a/win/rfb_win32/Dialog.cxx b/win/rfb_win32/Dialog.cxx index f147df45..cf8b2475 100644 --- a/win/rfb_win32/Dialog.cxx +++ b/win/rfb_win32/Dialog.cxx @@ -78,7 +78,7 @@ int Dialog::getItemInt(int id) { BOOL trans; int result = GetDlgItemInt(handle, id, &trans, TRUE); if (!trans) - throw std::runtime_error("unable to read dialog Int"); + throw std::runtime_error("Unable to read dialog Int"); return result; } const char* Dialog::getItemString(int id) { @@ -277,12 +277,12 @@ bool PropSheet::showPropSheet(HWND owner_, bool showApply, bool showCtxtHelp, bo if ((handle == nullptr) || (handle == (HWND)-1)) throw rdr::win32_error("PropertySheet failed", GetLastError()); centerWindow(handle, owner_); - plog.info("created %p", handle); + plog.info("Created %p", handle); (void)capture; #ifdef _DIALOG_CAPTURE if (capture) { - plog.info("capturing \"%s\"", title.c_str()); + plog.info("Capturing \"%s\"", title.c_str()); char* tmpdir = getenv("TEMP"); HDC dc = GetWindowDC(handle); DeviceFrameBuffer fb(dc); @@ -335,7 +335,7 @@ bool PropSheet::showPropSheet(HWND owner_, bool showApply, bool showCtxtHelp, bo } #endif - plog.info("finished %p", handle); + plog.info("Finished %p", handle); DestroyWindow(handle); handle = nullptr; diff --git a/win/rfb_win32/LaunchProcess.cxx b/win/rfb_win32/LaunchProcess.cxx index 38aa720f..93bd21fe 100644 --- a/win/rfb_win32/LaunchProcess.cxx +++ b/win/rfb_win32/LaunchProcess.cxx @@ -53,7 +53,7 @@ void LaunchProcess::start(HANDLE userToken, bool createConsole) { char buf[256]; HDESK desktop = GetThreadDesktop(GetCurrentThreadId()); if (!GetUserObjectInformation(desktop, UOI_NAME, buf, 256, &size)) - throw rdr::win32_error("unable to launch process", GetLastError()); + throw rdr::win32_error("Unable to launch process", GetLastError()); snprintf(desktopName, 256, "WinSta0\\%s", buf); @@ -95,7 +95,7 @@ void LaunchProcess::start(HANDLE userToken, bool createConsole) { flags, nullptr, nullptr, &sinfo, &procInfo); if (!success) - throw rdr::win32_error("unable to launch process", GetLastError()); + throw rdr::win32_error("Unable to launch process", GetLastError()); // Wait for it to finish initialising WaitForInputIdle(procInfo.hProcess, 15000); diff --git a/win/rfb_win32/MonitorInfo.cxx b/win/rfb_win32/MonitorInfo.cxx index 9f7c2daf..5d715ef6 100644 --- a/win/rfb_win32/MonitorInfo.cxx +++ b/win/rfb_win32/MonitorInfo.cxx @@ -44,7 +44,7 @@ static void fillMonitorInfo(HMONITOR monitor, MONITORINFOEXA* mi) { memset(mi, 0, sizeof(MONITORINFOEXA)); mi->cbSize = sizeof(MONITORINFOEXA); if (!GetMonitorInfo(monitor, mi)) - throw rdr::win32_error("failed to GetMonitorInfo", GetLastError()); + throw rdr::win32_error("Failed to GetMonitorInfo", GetLastError()); vlog.debug("Monitor is %ld,%ld-%ld,%ld", mi->rcMonitor.left, mi->rcMonitor.top, mi->rcMonitor.right, mi->rcMonitor.bottom); vlog.debug("Work area is %ld,%ld-%ld,%ld", mi->rcWork.left, mi->rcWork.top, mi->rcWork.right, mi->rcWork.bottom); vlog.debug("Device is \"%s\"", mi->szDevice); @@ -57,7 +57,7 @@ MonitorInfo::MonitorInfo(HWND window) { HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONEAREST); if (!monitor) - throw rdr::win32_error("failed to get monitor", GetLastError()); + throw rdr::win32_error("Failed to get monitor", GetLastError()); fillMonitorInfo(monitor, this); } @@ -67,7 +67,7 @@ MonitorInfo::MonitorInfo(const RECT& r) { HMONITOR monitor = MonitorFromRect(&r, MONITOR_DEFAULTTONEAREST); if (!monitor) - throw rdr::win32_error("failed to get monitor", GetLastError()); + throw rdr::win32_error("Failed to get monitor", GetLastError()); fillMonitorInfo(monitor, this); } diff --git a/win/rfb_win32/MsgWindow.cxx b/win/rfb_win32/MsgWindow.cxx index bd35ca0f..c89db851 100644 --- a/win/rfb_win32/MsgWindow.cxx +++ b/win/rfb_win32/MsgWindow.cxx @@ -82,7 +82,7 @@ MsgWindowClass::MsgWindowClass() : classAtom(0) { wndClass.lpszClassName = "rfb::win32::MsgWindowClass"; classAtom = RegisterClass(&wndClass); if (!classAtom) { - throw rdr::win32_error("unable to register MsgWindow window class", GetLastError()); + throw rdr::win32_error("Unable to register MsgWindow window class", GetLastError()); } } @@ -104,7 +104,7 @@ MsgWindow::MsgWindow(const char* name_) : name(name_), handle(nullptr) { name.c_str(), WS_OVERLAPPED, 0, 0, 10, 10, nullptr, nullptr, baseClass.instance, this); if (!handle) { - throw rdr::win32_error("unable to create WMNotifier window instance", GetLastError()); + throw rdr::win32_error("Unable to create WMNotifier window instance", GetLastError()); } vlog.debug("Created window \"%s\" (%p)", name.c_str(), handle); } diff --git a/win/rfb_win32/Registry.cxx b/win/rfb_win32/Registry.cxx index 27e55a2e..d40c9016 100644 --- a/win/rfb_win32/Registry.cxx +++ b/win/rfb_win32/Registry.cxx @@ -214,11 +214,11 @@ std::string RegKey::getRepresentation(const char* valname) const { DWORD type, length; LONG result = RegQueryValueEx(key, valname, nullptr, &type, nullptr, &length); if (result != ERROR_SUCCESS) - throw rdr::win32_error("get registry value length", result); + throw rdr::win32_error("Get registry value length", result); std::vector<uint8_t> data(length); result = RegQueryValueEx(key, valname, nullptr, &type, (BYTE*)data.data(), &length); if (result != ERROR_SUCCESS) - throw rdr::win32_error("get registry value", result); + throw rdr::win32_error("Get registry value", result); switch (type) { case REG_BINARY: @@ -247,14 +247,14 @@ std::string RegKey::getRepresentation(const char* valname) const { std::vector<char> expanded(required); length = ExpandEnvironmentStrings(str.c_str(), expanded.data(), required); if (required<length) - throw std::runtime_error("unable to expand environment strings"); + throw std::runtime_error("Unable to expand environment strings"); return expanded.data(); } else { return ""; } } default: - throw std::logic_error("unsupported registry type"); + throw std::logic_error("Unsupported registry type"); } } diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx index ee339649..b930328f 100644 --- a/win/rfb_win32/SDisplay.cxx +++ b/win/rfb_win32/SDisplay.cxx @@ -176,7 +176,7 @@ void SDisplay::startCore() { // Switch to the current input desktop if (rfb::win32::desktopChangeRequired()) { if (!rfb::win32::changeDesktop()) - throw std::runtime_error("unable to switch into input desktop"); + throw std::runtime_error("Unable to switch into input desktop"); } // Initialise the change tracker and clipper @@ -199,7 +199,7 @@ void SDisplay::startCore() { } catch (std::exception& e) { delete core; core = nullptr; if (tryMethod == 0) - throw std::runtime_error("unable to access desktop"); + throw std::runtime_error("Unable to access desktop"); tryMethod--; vlog.error("%s", e.what()); } diff --git a/win/rfb_win32/SDisplayCoreWMHooks.cxx b/win/rfb_win32/SDisplayCoreWMHooks.cxx index 4c307600..056ff4cb 100644 --- a/win/rfb_win32/SDisplayCoreWMHooks.cxx +++ b/win/rfb_win32/SDisplayCoreWMHooks.cxx @@ -40,7 +40,7 @@ SDisplayCoreWMHooks::SDisplayCoreWMHooks(SDisplay* d, UpdateTracker* ut) consolePollTimer(getHandle(), consolePollTimerId), pollConsoles(false) { if (!hooks.setEvent(display->getUpdateEvent())) - throw std::runtime_error("hook subsystem failed to initialise"); + throw std::runtime_error("Hook subsystem failed to initialise"); poller.setUpdateTracker(updateTracker); cursorTimer.start(20); consolePollTimer.start(200); diff --git a/win/rfb_win32/Security.cxx b/win/rfb_win32/Security.cxx index 9f970aeb..8f000e1b 100644 --- a/win/rfb_win32/Security.cxx +++ b/win/rfb_win32/Security.cxx @@ -96,7 +96,7 @@ void AccessEntries::addEntry(const PSID sid, PSID Sid::copySID(const PSID sid) { if (!IsValidSid(sid)) - throw std::invalid_argument("invalid SID in copyPSID"); + throw std::invalid_argument("Invalid SID in copyPSID"); PSID buf = (PSID)new uint8_t[GetLengthSid(sid)]; if (!CopySid(GetLengthSid(sid), buf, sid)) throw rdr::win32_error("CopySid failed", GetLastError()); @@ -105,7 +105,7 @@ PSID Sid::copySID(const PSID sid) { void Sid::setSID(const PSID sid) { if (!IsValidSid(sid)) - throw std::invalid_argument("invalid SID in copyPSID"); + throw std::invalid_argument("Invalid SID in copyPSID"); resize(GetLengthSid(sid)); if (!CopySid(GetLengthSid(sid), data(), sid)) throw rdr::win32_error("CopySid failed", GetLastError()); diff --git a/win/rfb_win32/WMPoller.cxx b/win/rfb_win32/WMPoller.cxx index 98e8dce3..e2ff0ac6 100644 --- a/win/rfb_win32/WMPoller.cxx +++ b/win/rfb_win32/WMPoller.cxx @@ -58,7 +58,7 @@ bool rfb::win32::WMPoller::checkPollWindow(HWND w) { char buffer[128]; if (!GetClassName(w, buffer, 128)) - throw rdr::win32_error("unable to get window class:%u", GetLastError()); + throw rdr::win32_error("Unable to get window class:%u", GetLastError()); if ((strcmp(buffer, "tty") != 0) && (strcmp(buffer, "ConsoleWindowClass") != 0)) { return false; |