aboutsummaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/rfb_win32/CleanDesktop.cxx16
-rw-r--r--win/rfb_win32/Clipboard.cxx22
-rw-r--r--win/rfb_win32/CurrentUser.cxx10
-rw-r--r--win/rfb_win32/DIBSectionBuffer.cxx6
-rw-r--r--win/rfb_win32/DeviceContext.cxx2
-rw-r--r--win/rfb_win32/DeviceFrameBuffer.cxx2
-rw-r--r--win/rfb_win32/Dialog.cxx2
-rw-r--r--win/rfb_win32/MonitorInfo.cxx6
-rw-r--r--win/rfb_win32/MsgWindow.cxx10
-rw-r--r--win/rfb_win32/RegConfig.cxx4
-rw-r--r--win/rfb_win32/Registry.cxx4
-rw-r--r--win/rfb_win32/SDisplay.cxx30
-rw-r--r--win/rfb_win32/SInput.cxx12
-rw-r--r--win/rfb_win32/Service.cxx66
-rw-r--r--win/rfb_win32/SocketManager.cxx8
-rw-r--r--win/rfb_win32/WMHooks.cxx20
-rw-r--r--win/vncconfig/Connections.h2
-rw-r--r--win/vncconfig/Legacy.cxx12
-rw-r--r--win/vncconfig/vncconfig.cxx2
-rw-r--r--win/winvnc/ManagedListener.cxx6
-rw-r--r--win/winvnc/VNCServerWin32.cxx2
-rw-r--r--win/winvnc/winvnc.cxx4
22 files changed, 124 insertions, 124 deletions
diff --git a/win/rfb_win32/CleanDesktop.cxx b/win/rfb_win32/CleanDesktop.cxx
index 6d933b22..3eb66bd1 100644
--- a/win/rfb_win32/CleanDesktop.cxx
+++ b/win/rfb_win32/CleanDesktop.cxx
@@ -61,7 +61,7 @@ struct ActiveDesktop {
HRESULT hr = handle->GetDesktopItem(i, &item, 0);
if (hr != S_OK) {
- vlog.error("unable to GetDesktopItem %d: %ld", i, hr);
+ vlog.error("Unable to GetDesktopItem %d: %ld", i, hr);
return false;
}
item.fChecked = enable_;
@@ -105,7 +105,7 @@ struct ActiveDesktop {
if (hr == S_OK)
modifyComponents = (adOptions.fActiveDesktop==0) != (enable_==false);
if (hr != S_OK) {
- vlog.error("failed to get/set Active Desktop options: %ld", hr);
+ vlog.error("Failed to get/set Active Desktop options: %ld", hr);
return false;
}
@@ -122,7 +122,7 @@ struct ActiveDesktop {
int itemCount = 0;
hr = handle->GetDesktopItemCount(&itemCount, 0);
if (hr != S_OK) {
- vlog.error("failed to get desktop item count: %ld", hr);
+ vlog.error("Failed to get desktop item count: %ld", hr);
return false;
}
for (int i=0; i<itemCount; i++) {
@@ -166,7 +166,7 @@ void CleanDesktop::disableWallpaper() {
try {
ImpersonateCurrentUser icu;
- vlog.debug("disable desktop wallpaper/Active Desktop");
+ vlog.debug("Disable desktop wallpaper/Active Desktop");
// -=- First attempt to remove the wallpaper using Active Desktop
try {
@@ -191,7 +191,7 @@ void CleanDesktop::enableWallpaper() {
ImpersonateCurrentUser icu;
if (restoreActiveDesktop) {
- vlog.debug("restore Active Desktop");
+ vlog.debug("Restore Active Desktop");
// -=- First attempt to re-enable Active Desktop
try {
@@ -204,7 +204,7 @@ void CleanDesktop::enableWallpaper() {
}
if (restoreWallpaper) {
- vlog.debug("restore desktop wallpaper");
+ vlog.debug("Restore desktop wallpaper");
// -=- Then restore the standard wallpaper if required
SysParamsInfo(SPI_SETDESKWALLPAPER, 0, nullptr, SPIF_SENDCHANGE);
@@ -221,7 +221,7 @@ void CleanDesktop::disableEffects() {
try {
ImpersonateCurrentUser icu;
- vlog.debug("disable desktop effects");
+ vlog.debug("Disable desktop effects");
SysParamsInfo(SPI_SETFONTSMOOTHING, FALSE, nullptr, SPIF_SENDCHANGE);
if (SysParamsInfo(SPI_GETUIEFFECTS, 0, &uiEffects, 0) == ERROR_CALL_NOT_IMPLEMENTED) {
@@ -253,7 +253,7 @@ void CleanDesktop::enableEffects() {
if (restoreEffects) {
ImpersonateCurrentUser icu;
- vlog.debug("restore desktop effects");
+ vlog.debug("Restore desktop effects");
RegKey desktopCfg;
desktopCfg.openKey(HKEY_CURRENT_USER, "Control Panel\\Desktop");
diff --git a/win/rfb_win32/Clipboard.cxx b/win/rfb_win32/Clipboard.cxx
index 242ebf34..d3b99200 100644
--- a/win/rfb_win32/Clipboard.cxx
+++ b/win/rfb_win32/Clipboard.cxx
@@ -41,11 +41,11 @@ static LogWriter vlog("Clipboard");
Clipboard::Clipboard()
: MsgWindow("Clipboard"), notifier(nullptr), next_window(nullptr) {
next_window = SetClipboardViewer(getHandle());
- vlog.debug("registered clipboard handler");
+ vlog.debug("Registered clipboard handler");
}
Clipboard::~Clipboard() {
- vlog.debug("removing %p from chain (next is %p)", getHandle(), next_window);
+ vlog.debug("Removing %p from chain (next is %p)", getHandle(), next_window);
ChangeClipboardChain(getHandle(), next_window);
}
@@ -54,26 +54,26 @@ Clipboard::processMessage(UINT msg, WPARAM wParam, LPARAM lParam) {
switch (msg) {
case WM_CHANGECBCHAIN:
- vlog.debug("change clipboard chain (%I64x, %I64x)",
+ vlog.debug("Change clipboard chain (%I64x, %I64x)",
(long long)wParam, (long long)lParam);
if ((HWND) wParam == next_window)
next_window = (HWND) lParam;
else if (next_window != nullptr)
SendMessage(next_window, msg, wParam, lParam);
else
- vlog.error("bad clipboard chain change!");
+ vlog.error("Bad clipboard chain change!");
break;
case WM_DRAWCLIPBOARD:
{
HWND owner = GetClipboardOwner();
if (owner == getHandle()) {
- vlog.debug("local clipboard changed by me");
+ vlog.debug("Local clipboard changed by me");
} else {
- vlog.debug("local clipboard changed by %p", owner);
+ vlog.debug("Local clipboard changed by %p", owner);
if (notifier == nullptr)
- vlog.debug("no clipboard notifier registered");
+ vlog.debug("No clipboard notifier registered");
else
notifier->notifyClipboardChanged(IsClipboardFormatAvailable(CF_UNICODETEXT));
}
@@ -149,18 +149,18 @@ Clipboard::setClipText(const char* text) {
throw rdr::Win32Exception("unable to set Win32 clipboard", GetLastError());
clip_handle = nullptr;
- vlog.debug("set clipboard");
+ vlog.debug("Set clipboard");
} catch (rdr::Exception& e) {
vlog.debug("%s", e.str());
}
// - Close the clipboard
if (!CloseClipboard())
- vlog.debug("unable to close Win32 clipboard: %lu", GetLastError());
+ vlog.debug("Unable to close Win32 clipboard: %lu", GetLastError());
else
- vlog.debug("closed clipboard");
+ vlog.debug("Closed clipboard");
if (clip_handle) {
- vlog.debug("freeing clipboard handle");
+ vlog.debug("Freeing clipboard handle");
GlobalFree(clip_handle);
}
}
diff --git a/win/rfb_win32/CurrentUser.cxx b/win/rfb_win32/CurrentUser.cxx
index fc0f689e..1607f0b1 100644
--- a/win/rfb_win32/CurrentUser.cxx
+++ b/win/rfb_win32/CurrentUser.cxx
@@ -41,7 +41,7 @@ BOOL CALLBACK enumWindows(HWND hwnd, LPARAM lParam) {
char className[16];
if (GetClassName(hwnd, className, sizeof(className)) &&
(strcmp(className, shellIconClass) == 0)) {
- vlog.debug("located tray icon window (%s)", className);
+ vlog.debug("Located tray icon window (%s)", className);
DWORD processId = 0;
GetWindowThreadProcessId(hwnd, &processId);
if (!processId)
@@ -51,7 +51,7 @@ BOOL CALLBACK enumWindows(HWND hwnd, LPARAM lParam) {
return TRUE;
if (!OpenProcessToken(process, MAXIMUM_ALLOWED, (HANDLE*)lParam))
return TRUE;
- vlog.debug("obtained user token");
+ vlog.debug("Obtained user token");
return FALSE;
}
return TRUE;
@@ -59,14 +59,14 @@ BOOL CALLBACK enumWindows(HWND hwnd, LPARAM lParam) {
BOOL CALLBACK enumDesktops(LPTSTR lpszDesktop, LPARAM lParam) {
HDESK desktop = OpenDesktop(lpszDesktop, 0, FALSE, DESKTOP_ENUMERATE);
- vlog.debug("opening \"%s\"", lpszDesktop);
+ vlog.debug("Opening \"%s\"", lpszDesktop);
if (!desktop) {
- vlog.info("desktop \"%s\" inaccessible", lpszDesktop);
+ vlog.info("Desktop \"%s\" inaccessible", lpszDesktop);
return TRUE;
}
BOOL result = EnumDesktopWindows(desktop, enumWindows, lParam);
if (!CloseDesktop(desktop))
- vlog.info("unable to close desktop: %ld", GetLastError());
+ vlog.info("Unable to close desktop: %ld", GetLastError());
return result;
}
diff --git a/win/rfb_win32/DIBSectionBuffer.cxx b/win/rfb_win32/DIBSectionBuffer.cxx
index ca6f3c9a..1b2a1b44 100644
--- a/win/rfb_win32/DIBSectionBuffer.cxx
+++ b/win/rfb_win32/DIBSectionBuffer.cxx
@@ -90,11 +90,11 @@ void DIBSectionBuffer::initBuffer(const PixelFormat& pf, int w, int h) {
vlog.debug("recreateBuffer()");
} else {
- vlog.debug("one of area or format not set");
+ vlog.debug("One of area or format not set");
}
if (new_bitmap && bitmap) {
- vlog.debug("preserving bitmap contents");
+ vlog.debug("Preserving bitmap contents");
// Copy the contents across
if (device) {
@@ -137,7 +137,7 @@ void DIBSectionBuffer::initBuffer(const PixelFormat& pf, int w, int h) {
if (bytesPerRow % 4) {
bytesPerRow += 4 - (bytesPerRow % 4);
new_stride = (bytesPerRow * 8) / format.bpp;
- vlog.info("adjusting DIB stride: %d to %d", w, new_stride);
+ vlog.info("Adjusting DIB stride: %d to %d", w, new_stride);
}
setBuffer(w, h, new_data, new_stride);
diff --git a/win/rfb_win32/DeviceContext.cxx b/win/rfb_win32/DeviceContext.cxx
index fa0beaf9..e6dc8508 100644
--- a/win/rfb_win32/DeviceContext.cxx
+++ b/win/rfb_win32/DeviceContext.cxx
@@ -86,7 +86,7 @@ PixelFormat DeviceContext::getPF(HDC dc) {
bMask = 0x0000ff;
break;
default:
- vlog.error("bits per pixel %u not supported", bi.bmiHeader.biBitCount);
+ vlog.error("Bits per pixel %u not supported", bi.bmiHeader.biBitCount);
throw rdr::Exception("unknown bits per pixel specified");
};
break;
diff --git a/win/rfb_win32/DeviceFrameBuffer.cxx b/win/rfb_win32/DeviceFrameBuffer.cxx
index ca2f57d4..eaed650c 100644
--- a/win/rfb_win32/DeviceFrameBuffer.cxx
+++ b/win/rfb_win32/DeviceFrameBuffer.cxx
@@ -256,7 +256,7 @@ void DeviceFrameBuffer::setCursor(HCURSOR hCursor, VNCServer* server)
}
if (doOutline) {
- vlog.debug("drawing cursor outline!");
+ vlog.debug("Drawing cursor outline!");
// The buffer needs to be slightly larger to make sure there
// is room for the outline pixels
diff --git a/win/rfb_win32/Dialog.cxx b/win/rfb_win32/Dialog.cxx
index 35ec065e..3d2edc9b 100644
--- a/win/rfb_win32/Dialog.cxx
+++ b/win/rfb_win32/Dialog.cxx
@@ -306,7 +306,7 @@ bool PropSheet::showPropSheet(HWND owner_, bool showApply, bool showCtxtHelp, bo
}
char filename[256];
sprintf(filename, "%s\\%s.bmp", tmpdir, title);
- vlog.debug("writing to %s", filename);
+ vlog.debug("Writing to %s", filename);
saveBMP(filename, &fb);
i++;
}
diff --git a/win/rfb_win32/MonitorInfo.cxx b/win/rfb_win32/MonitorInfo.cxx
index 854b467a..f35ef69e 100644
--- a/win/rfb_win32/MonitorInfo.cxx
+++ b/win/rfb_win32/MonitorInfo.cxx
@@ -45,9 +45,9 @@ static void fillMonitorInfo(HMONITOR monitor, MONITORINFOEXA* mi) {
mi->cbSize = sizeof(MONITORINFOEXA);
if (!GetMonitorInfo(monitor, mi))
throw rdr::Win32Exception("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);
+ 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);
}
diff --git a/win/rfb_win32/MsgWindow.cxx b/win/rfb_win32/MsgWindow.cxx
index e94b60a8..8f15c41d 100644
--- a/win/rfb_win32/MsgWindow.cxx
+++ b/win/rfb_win32/MsgWindow.cxx
@@ -55,14 +55,14 @@ LRESULT CALLBACK MsgWindowProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
SetWindowLongPtr(wnd, GWLP_USERDATA, 0);
MsgWindow* _this = (MsgWindow*) GetWindowLongPtr(wnd, GWLP_USERDATA);
if (!_this) {
- vlog.info("null _this in %p, message %x", wnd, msg);
+ vlog.info("Null _this in %p, message %x", wnd, msg);
return SafeDefWindowProc(wnd, msg, wParam, lParam);
}
try {
result = _this->processMessage(msg, wParam, lParam);
} catch (rdr::Exception& e) {
- vlog.error("untrapped: %s", e.str());
+ vlog.error("Untrapped: %s", e.str());
}
return result;
@@ -99,20 +99,20 @@ static MsgWindowClass baseClass;
//
MsgWindow::MsgWindow(const char* name_) : name(name_), handle(nullptr) {
- vlog.debug("creating window \"%s\"", name.c_str());
+ vlog.debug("Creating window \"%s\"", name.c_str());
handle = CreateWindow((const char*)(intptr_t)baseClass.classAtom,
name.c_str(), WS_OVERLAPPED, 0, 0, 10, 10,
nullptr, nullptr, baseClass.instance, this);
if (!handle) {
throw rdr::Win32Exception("unable to create WMNotifier window instance", GetLastError());
}
- vlog.debug("created window \"%s\" (%p)", name.c_str(), handle);
+ vlog.debug("Created window \"%s\" (%p)", name.c_str(), handle);
}
MsgWindow::~MsgWindow() {
if (handle)
DestroyWindow(handle);
- vlog.debug("destroyed window \"%s\" (%p)", name.c_str(), handle);
+ vlog.debug("Destroyed window \"%s\" (%p)", name.c_str(), handle);
}
LRESULT
diff --git a/win/rfb_win32/RegConfig.cxx b/win/rfb_win32/RegConfig.cxx
index fc006b21..d95166f4 100644
--- a/win/rfb_win32/RegConfig.cxx
+++ b/win/rfb_win32/RegConfig.cxx
@@ -67,7 +67,7 @@ void RegConfig::loadRegistryConfig(RegKey& key) {
if (!name) break;
std::string value = key.getRepresentation(name);
if (!Configuration::setParam(name, value.c_str()))
- vlog.info("unable to process %s", name);
+ vlog.info("Unable to process %s", name);
}
} catch (rdr::Win32Exception& e) {
if (e.err != ERROR_INVALID_HANDLE)
@@ -76,7 +76,7 @@ void RegConfig::loadRegistryConfig(RegKey& key) {
}
void RegConfig::processEvent(HANDLE /*event*/) {
- vlog.info("registry changed");
+ vlog.info("Registry changed");
// Reinstate the registry change notifications
ResetEvent(event);
diff --git a/win/rfb_win32/Registry.cxx b/win/rfb_win32/Registry.cxx
index bbe15f47..4aa0e013 100644
--- a/win/rfb_win32/Registry.cxx
+++ b/win/rfb_win32/Registry.cxx
@@ -55,7 +55,7 @@ RegKey::RegKey(const HKEY k) : key(nullptr), freeKey(false), valueName(nullptr),
LONG result = RegOpenKeyEx(k, nullptr, 0, KEY_ALL_ACCESS, &key);
if (result != ERROR_SUCCESS)
throw rdr::Win32Exception("RegOpenKeyEx(HKEY)", result);
- vlog.debug("duplicated %p to %p", k, key);
+ vlog.debug("Duplicated %p to %p", k, key);
freeKey = true;
}
@@ -63,7 +63,7 @@ RegKey::RegKey(const RegKey& k) : key(nullptr), freeKey(false), valueName(nullpt
LONG result = RegOpenKeyEx(k.key, nullptr, 0, KEY_ALL_ACCESS, &key);
if (result != ERROR_SUCCESS)
throw rdr::Win32Exception("RegOpenKeyEx(RegKey&)", result);
- vlog.debug("duplicated %p to %p", k.key, key);
+ vlog.debug("Duplicated %p to %p", k.key, key);
freeKey = true;
}
diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx
index 0ec5e231..1c269dd5 100644
--- a/win/rfb_win32/SDisplay.cxx
+++ b/win/rfb_win32/SDisplay.cxx
@@ -103,7 +103,7 @@ void SDisplay::init(VNCServer* vs)
void SDisplay::start()
{
- vlog.debug("starting");
+ vlog.debug("Starting");
// Try to make session zero the console session
if (!inConsoleSession())
@@ -112,26 +112,26 @@ void SDisplay::start()
// Start the SDisplay core
startCore();
- vlog.debug("started");
+ vlog.debug("Started");
if (statusLocation) *statusLocation = true;
}
void SDisplay::stop()
{
- vlog.debug("stopping");
+ vlog.debug("Stopping");
// If we successfully start()ed then perform the DisconnectAction
if (core) {
CurrentUserToken cut;
if (stricmp(disconnectAction, "Logoff") == 0) {
if (!cut.h)
- vlog.info("ignoring DisconnectAction=Logoff - no current user");
+ vlog.info("Ignoring DisconnectAction=Logoff - no current user");
else
ExitWindowsEx(EWX_LOGOFF, 0);
} else if (stricmp(disconnectAction, "Lock") == 0) {
if (!cut.h) {
- vlog.info("ignoring DisconnectAction=Lock - no current user");
+ vlog.info("Ignoring DisconnectAction=Lock - no current user");
} else {
LockWorkStation();
}
@@ -142,7 +142,7 @@ void SDisplay::stop()
server->setPixelBuffer(nullptr);
stopCore();
- vlog.debug("stopped");
+ vlog.debug("Stopped");
if (statusLocation) *statusLocation = false;
}
@@ -279,14 +279,14 @@ bool SDisplay::isRestartRequired() {
void SDisplay::restartCore() {
- vlog.info("restarting");
+ vlog.info("Restarting");
// Stop the existing Core related resources
stopCore();
try {
// Start a new Core if possible
startCore();
- vlog.info("restarted");
+ vlog.info("Restarted");
} catch (rdr::Exception& e) {
// If startCore() fails then we MUST disconnect all clients,
// to cause the server to stop() the desktop.
@@ -352,7 +352,7 @@ bool SDisplay::checkLedState() {
void
SDisplay::notifyClipboardChanged(bool available) {
- vlog.debug("clipboard text changed");
+ vlog.debug("Clipboard text changed");
if (server)
server->announceClipboard(available);
}
@@ -362,15 +362,15 @@ void
SDisplay::notifyDisplayEvent(WMMonitor::Notifier::DisplayEventType evt) {
switch (evt) {
case WMMonitor::Notifier::DisplaySizeChanged:
- vlog.debug("desktop size changed");
+ vlog.debug("Desktop size changed");
recreatePixelBuffer();
break;
case WMMonitor::Notifier::DisplayPixelFormatChanged:
- vlog.debug("desktop format changed");
+ vlog.debug("Desktop format changed");
recreatePixelBuffer();
break;
default:
- vlog.error("unknown display event received");
+ vlog.error("Unknown display event received");
}
}
@@ -382,7 +382,7 @@ SDisplay::processEvent(HANDLE event) {
// - If the SDisplay isn't even started then quit now
if (!core) {
- vlog.error("not start()ed");
+ vlog.error("Not start()ed");
return;
}
@@ -480,14 +480,14 @@ SDisplay::recreatePixelBuffer(bool force) {
flushChangeTracker();
// Delete the old pixelbuffer and device context
- vlog.debug("deleting old pixel buffer & device");
+ vlog.debug("Deleting old pixel buffer & device");
if (pb)
delete pb;
if (device)
delete device;
// Create a DeviceFrameBuffer attached to the new device
- vlog.debug("creating pixel buffer");
+ vlog.debug("Creating pixel buffer");
DeviceFrameBuffer* new_buffer = new DeviceFrameBuffer(*new_device);
// Replace the old PixelBuffer
diff --git a/win/rfb_win32/SInput.cxx b/win/rfb_win32/SInput.cxx
index 258eb057..ae78ca66 100644
--- a/win/rfb_win32/SInput.cxx
+++ b/win/rfb_win32/SInput.cxx
@@ -412,7 +412,7 @@ void win32::SKeyboard::keyEvent(uint32_t keysym, uint32_t keycode, bool down)
SHORT dc = VkKeyScan(keysym);
if (dc != -1) {
if (down) {
- vlog.info("latin-1 dead key: 0x%x vkCode 0x%x mod 0x%x "
+ vlog.info("Latin-1 dead key: 0x%x vkCode 0x%x mod 0x%x "
"followed by space", keysym, LOBYTE(dc), HIBYTE(dc));
doKeyEventWithModifiers(LOBYTE(dc), HIBYTE(dc), true);
doKeyEventWithModifiers(LOBYTE(dc), HIBYTE(dc), false);
@@ -438,7 +438,7 @@ void win32::SKeyboard::keyEvent(uint32_t keysym, uint32_t keycode, bool down)
SHORT dc = VkKeyScan(latin1ToDeadChars[j].deadChar);
SHORT bc = VkKeyScan(latin1ToDeadChars[j].baseChar);
if (dc != -1 && bc != -1) {
- vlog.info("latin-1 key: 0x%x dead key vkCode 0x%x mod 0x%x "
+ vlog.info("Latin-1 key: 0x%x dead key vkCode 0x%x mod 0x%x "
"followed by vkCode 0x%x mod 0x%x",
keysym, LOBYTE(dc), HIBYTE(dc),
LOBYTE(bc), HIBYTE(bc));
@@ -454,14 +454,14 @@ void win32::SKeyboard::keyEvent(uint32_t keysym, uint32_t keycode, bool down)
break;
}
}
- vlog.info("ignoring unrecognised Latin-1 keysym 0x%x",keysym);
+ vlog.info("Ignoring unrecognised Latin-1 keysym 0x%x",keysym);
}
return;
}
BYTE vkCode = LOBYTE(s);
BYTE modifierState = HIBYTE(s);
- vlog.debug("latin-1 key: 0x%x vkCode 0x%x mod 0x%x down %d",
+ vlog.debug("Latin-1 key: 0x%x vkCode 0x%x mod 0x%x down %d",
keysym, vkCode, modifierState, down);
doKeyEventWithModifiers(vkCode, modifierState, down);
@@ -470,7 +470,7 @@ void win32::SKeyboard::keyEvent(uint32_t keysym, uint32_t keycode, bool down)
// see if it's a recognised keyboard key, otherwise ignore it
if (vkMap.find(keysym) == vkMap.end()) {
- vlog.info("ignoring unknown keysym 0x%x",keysym);
+ vlog.info("Ignoring unknown keysym 0x%x",keysym);
return;
}
BYTE vkCode = vkMap[keysym];
@@ -478,7 +478,7 @@ void win32::SKeyboard::keyEvent(uint32_t keysym, uint32_t keycode, bool down)
if (extendedMap[keysym]) flags |= KEYEVENTF_EXTENDEDKEY;
if (!down) flags |= KEYEVENTF_KEYUP;
- vlog.debug("keyboard key: keysym 0x%x vkCode 0x%x ext %d down %d",
+ vlog.debug("Keyboard key: keysym 0x%x vkCode 0x%x ext %d down %d",
keysym, vkCode, extendedMap[keysym], down);
if (down && (vkCode == VK_DELETE) &&
((GetAsyncKeyState(VK_CONTROL) & 0x8000) != 0) &&
diff --git a/win/rfb_win32/Service.cxx b/win/rfb_win32/Service.cxx
index dbbf6ab6..86e1dc5c 100644
--- a/win/rfb_win32/Service.cxx
+++ b/win/rfb_win32/Service.cxx
@@ -72,19 +72,19 @@ VOID WINAPI serviceHandler(DWORD control) {
// -=- Service main procedure
VOID WINAPI serviceProc(DWORD dwArgc, LPTSTR* lpszArgv) {
- vlog.debug("entering %s serviceProc", service->getName());
- vlog.info("registering handler...");
+ vlog.debug("Entering %s serviceProc", service->getName());
+ vlog.info("Registering handler...");
service->status_handle = RegisterServiceCtrlHandler(service->getName(), serviceHandler);
if (!service->status_handle) {
DWORD err = GetLastError();
- vlog.error("failed to register handler: %lu", err);
+ vlog.error("Failed to register handler: %lu", err);
ExitProcess(err);
}
- vlog.debug("registered handler (%p)", service->status_handle);
+ vlog.debug("Registered handler (%p)", service->status_handle);
service->setStatus(SERVICE_START_PENDING);
- vlog.debug("entering %s serviceMain", service->getName());
+ vlog.debug("Entering %s serviceMain", service->getName());
service->status.dwWin32ExitCode = service->serviceMain(dwArgc, lpszArgv);
- vlog.debug("leaving %s serviceMain", service->getName());
+ vlog.debug("Leaving %s serviceMain", service->getName());
service->setStatus(SERVICE_STOPPED);
}
@@ -110,12 +110,12 @@ Service::start() {
entry[0].lpServiceProc = serviceProc;
entry[1].lpServiceName = nullptr;
entry[1].lpServiceProc = nullptr;
- vlog.debug("entering dispatcher");
+ vlog.debug("Entering dispatcher");
if (!SetProcessShutdownParameters(0x100, 0))
- vlog.error("unable to set shutdown parameters: %lu", GetLastError());
+ vlog.error("Unable to set shutdown parameters: %lu", GetLastError());
service = this;
if (!StartServiceCtrlDispatcher(entry))
- throw Win32Exception("unable to start service", GetLastError());
+ throw Win32Exception("Unable to start service", GetLastError());
}
void
@@ -134,9 +134,9 @@ Service::setStatus(DWORD state) {
if (!SetServiceStatus(status_handle, &status)) {
status.dwCurrentState = SERVICE_STOPPED;
status.dwWin32ExitCode = GetLastError();
- vlog.error("unable to set service status:%lu", status.dwWin32ExitCode);
+ vlog.error("Unable to set service status:%lu", status.dwWin32ExitCode);
}
- vlog.debug("set status to %lu(%lu)", state, status.dwCheckPoint);
+ vlog.debug("Set status to %lu(%lu)", state, status.dwCheckPoint);
}
Service::~Service() {
@@ -162,7 +162,7 @@ switchToDesktop(HDESK desktop) {
return false;
}
if (!CloseDesktop(old_desktop))
- vlog.debug("unable to close old desktop:%lu", GetLastError());
+ vlog.debug("Unable to close old desktop:%lu", GetLastError());
return true;
}
@@ -176,7 +176,7 @@ inputDesktopSelected() {
DESKTOP_WRITEOBJECTS | DESKTOP_READOBJECTS |
DESKTOP_SWITCHDESKTOP | GENERIC_WRITE);
if (!input) {
- vlog.debug("unable to OpenInputDesktop(1):%lu", GetLastError());
+ vlog.debug("Unable to OpenInputDesktop(1):%lu", GetLastError());
return false;
}
@@ -185,17 +185,17 @@ inputDesktopSelected() {
char inputname[256];
if (!GetUserObjectInformation(current, UOI_NAME, currentname, 256, &size)) {
- vlog.debug("unable to GetUserObjectInformation(1):%lu", GetLastError());
+ vlog.debug("Unable to GetUserObjectInformation(1):%lu", GetLastError());
CloseDesktop(input);
return false;
}
if (!GetUserObjectInformation(input, UOI_NAME, inputname, 256, &size)) {
- vlog.debug("unable to GetUserObjectInformation(2):%lu", GetLastError());
+ vlog.debug("Unable to GetUserObjectInformation(2):%lu", GetLastError());
CloseDesktop(input);
return false;
}
if (!CloseDesktop(input))
- vlog.debug("unable to close input desktop:%lu", GetLastError());
+ vlog.debug("Unable to close input desktop:%lu", GetLastError());
// *** vlog.debug("current=%s, input=%s", currentname, inputname);
bool result = strcmp(currentname, inputname) == 0;
@@ -212,7 +212,7 @@ selectInputDesktop() {
DESKTOP_WRITEOBJECTS | DESKTOP_READOBJECTS |
DESKTOP_SWITCHDESKTOP | GENERIC_WRITE);
if (!desktop) {
- vlog.debug("unable to OpenInputDesktop(2):%lu", GetLastError());
+ vlog.debug("Unable to OpenInputDesktop(2):%lu", GetLastError());
return false;
}
@@ -226,11 +226,11 @@ selectInputDesktop() {
DWORD size = 256;
char currentname[256];
if (GetUserObjectInformation(desktop, UOI_NAME, currentname, 256, &size)) {
- vlog.debug("switched to %s", currentname);
+ vlog.debug("Switched to %s", currentname);
}
// ***
- vlog.debug("switched to input desktop");
+ vlog.debug("Switched to input desktop");
return true;
}
@@ -335,7 +335,7 @@ bool rfb::win32::registerService(const char* name,
// - Open the SCM
ServiceHandle scm = OpenSCManager(nullptr, nullptr, SC_MANAGER_CREATE_SERVICE);
if (!scm)
- throw rdr::Win32Exception("unable to open Service Control Manager", GetLastError());
+ throw rdr::Win32Exception("Unable to open service control manager", GetLastError());
// - Add the service
ServiceHandle handle = CreateService(scm,
@@ -344,7 +344,7 @@ bool rfb::win32::registerService(const char* name,
SERVICE_AUTO_START, SERVICE_ERROR_IGNORE,
cmdline.c_str(), nullptr, nullptr, nullptr, nullptr, nullptr);
if (!handle)
- throw rdr::Win32Exception("unable to create service", GetLastError());
+ throw rdr::Win32Exception("Unable to create service", GetLastError());
// - Set a description
SERVICE_DESCRIPTION sdesc = {(LPTSTR)desc};
@@ -380,14 +380,14 @@ bool rfb::win32::unregisterService(const char* name) {
// - Open the SCM
ServiceHandle scm = OpenSCManager(nullptr, nullptr, SC_MANAGER_CREATE_SERVICE);
if (!scm)
- throw rdr::Win32Exception("unable to open Service Control Manager", GetLastError());
+ throw rdr::Win32Exception("Unable to open service control manager", GetLastError());
// - Create the service
ServiceHandle handle = OpenService(scm, name, SC_MANAGER_ALL_ACCESS);
if (!handle)
- throw rdr::Win32Exception("unable to locate the service", GetLastError());
+ throw rdr::Win32Exception("Unable to locate the service", GetLastError());
if (!DeleteService(handle))
- throw rdr::Win32Exception("unable to remove the service", GetLastError());
+ throw rdr::Win32Exception("Unable to remove the service", GetLastError());
// - Register the event log source
RegKey hk;
@@ -407,16 +407,16 @@ bool rfb::win32::startService(const char* name) {
// - Open the SCM
ServiceHandle scm = OpenSCManager(nullptr, nullptr, SC_MANAGER_CONNECT);
if (!scm)
- throw rdr::Win32Exception("unable to open Service Control Manager", GetLastError());
+ throw rdr::Win32Exception("Unable to open service control manager", GetLastError());
// - Locate the service
ServiceHandle handle = OpenService(scm, name, SERVICE_START);
if (!handle)
- throw rdr::Win32Exception("unable to open the service", GetLastError());
+ throw rdr::Win32Exception("Unable to open the service", GetLastError());
// - Start the service
if (!StartService(handle, 0, nullptr))
- throw rdr::Win32Exception("unable to start the service", GetLastError());
+ throw rdr::Win32Exception("Unable to start the service", GetLastError());
Sleep(500);
@@ -427,17 +427,17 @@ bool rfb::win32::stopService(const char* name) {
// - Open the SCM
ServiceHandle scm = OpenSCManager(nullptr, nullptr, SC_MANAGER_CONNECT);
if (!scm)
- throw rdr::Win32Exception("unable to open Service Control Manager", GetLastError());
+ throw rdr::Win32Exception("Unable to open service control manager", GetLastError());
// - Locate the service
ServiceHandle handle = OpenService(scm, name, SERVICE_STOP);
if (!handle)
- throw rdr::Win32Exception("unable to open the service", GetLastError());
+ throw rdr::Win32Exception("Unable to open the service", GetLastError());
// - Start the service
SERVICE_STATUS status;
if (!ControlService(handle, SERVICE_CONTROL_STOP, &status))
- throw rdr::Win32Exception("unable to stop the service", GetLastError());
+ throw rdr::Win32Exception("Unable to stop the service", GetLastError());
Sleep(500);
@@ -448,17 +448,17 @@ DWORD rfb::win32::getServiceState(const char* name) {
// - Open the SCM
ServiceHandle scm = OpenSCManager(nullptr, nullptr, SC_MANAGER_CONNECT);
if (!scm)
- throw rdr::Win32Exception("unable to open Service Control Manager", GetLastError());
+ throw rdr::Win32Exception("Unable to open service control manager", GetLastError());
// - Locate the service
ServiceHandle handle = OpenService(scm, name, SERVICE_INTERROGATE);
if (!handle)
- throw rdr::Win32Exception("unable to open the service", GetLastError());
+ throw rdr::Win32Exception("Unable to open the service", GetLastError());
// - Get the service status
SERVICE_STATUS status;
if (!ControlService(handle, SERVICE_CONTROL_INTERROGATE, (SERVICE_STATUS*)&status))
- throw rdr::Win32Exception("unable to query the service", GetLastError());
+ throw rdr::Win32Exception("Unable to query the service", GetLastError());
return status.dwCurrentState;
}
diff --git a/win/rfb_win32/SocketManager.cxx b/win/rfb_win32/SocketManager.cxx
index 2bc2f53e..9fdecb94 100644
--- a/win/rfb_win32/SocketManager.cxx
+++ b/win/rfb_win32/SocketManager.cxx
@@ -201,7 +201,7 @@ void SocketManager::processEvent(HANDLE event) {
ListenInfo li = listeners[event];
// Accept an incoming connection
- vlog.debug("accepting incoming connection");
+ vlog.debug("Accepting incoming connection");
// What kind of event is this?
WSANETWORKEVENTS network_events;
@@ -215,13 +215,13 @@ void SocketManager::processEvent(HANDLE event) {
if (new_sock)
addSocket(new_sock, li.server, false);
} else if (network_events.lNetworkEvents & FD_CLOSE) {
- vlog.info("deleting listening socket");
+ vlog.info("Deleting listening socket");
remListener(li.sock);
} else if (network_events.lNetworkEvents & FD_ADDRESS_LIST_CHANGE) {
li.notifier->processAddressChange();
requestAddressChangeEvents(li.sock);
} else {
- vlog.error("unknown listener event: %lx", network_events.lNetworkEvents);
+ vlog.error("Unknown listener event: %lx", network_events.lNetworkEvents);
}
} else if (connections.count(event)) {
ConnInfo ci = connections[event];
@@ -234,7 +234,7 @@ void SocketManager::processEvent(HANDLE event) {
// Fetch why this event notification triggered
if (WSAEnumNetworkEvents(ci.sock->getFd(), event, &network_events) == SOCKET_ERROR)
- throw rdr::SocketException("unable to get WSAEnumNetworkEvents:%u", WSAGetLastError());
+ throw rdr::SocketException("Unable to get WSAEnumNetworkEvents:%u", WSAGetLastError());
// Cancel event notification for this socket
if (WSAEventSelect(ci.sock->getFd(), event, 0) == SOCKET_ERROR)
diff --git a/win/rfb_win32/WMHooks.cxx b/win/rfb_win32/WMHooks.cxx
index cb2e0275..e1840eef 100644
--- a/win/rfb_win32/WMHooks.cxx
+++ b/win/rfb_win32/WMHooks.cxx
@@ -136,14 +136,14 @@ static bool StartHookThread() {
return true;
if (hooksLibrary == nullptr)
return false;
- vlog.debug("creating thread");
+ vlog.debug("Creating thread");
hook_mgr = new WMHooksThread();
hook_mgr->start();
while (hook_mgr->getThreadId() == (DWORD)-1)
Sleep(0);
- vlog.debug("installing hooks");
+ vlog.debug("Installing hooks");
if (!WM_Hooks_Install(hook_mgr->getThreadId(), 0)) {
- vlog.error("failed to initialise hooks");
+ vlog.error("Failed to initialise hooks");
hook_mgr->stop();
delete hook_mgr;
hook_mgr = nullptr;
@@ -157,7 +157,7 @@ static void StopHookThread() {
return;
if (!hooks.empty())
return;
- vlog.debug("closing thread");
+ vlog.debug("Closing thread");
hook_mgr->stop();
delete hook_mgr;
hook_mgr = nullptr;
@@ -165,7 +165,7 @@ static void StopHookThread() {
static bool AddHook(WMHooks* hook) {
- vlog.debug("adding hook");
+ vlog.debug("Adding hook");
os::AutoMutex a(&hook_mgr_lock);
if (!StartHookThread())
return false;
@@ -175,7 +175,7 @@ static bool AddHook(WMHooks* hook) {
static bool RemHook(WMHooks* hook) {
{
- vlog.debug("removing hook");
+ vlog.debug("Removing hook");
os::AutoMutex a(&hook_mgr_lock);
hooks.remove(hook);
}
@@ -216,7 +216,7 @@ WMHooksThread::worker() {
Region updates[2];
int activeRgn = 0;
- vlog.debug("starting hook thread");
+ vlog.debug("Starting hook thread");
thread_id = GetCurrentThreadId();
@@ -291,16 +291,16 @@ WMHooksThread::worker() {
}
}
- vlog.debug("stopping hook thread - processed %d events", count);
+ vlog.debug("Stopping hook thread - processed %d events", count);
WM_Hooks_Remove(getThreadId());
}
void
WMHooksThread::stop() {
- vlog.debug("stopping WMHooks thread");
+ vlog.debug("Stopping WMHooks thread");
active = false;
PostThreadMessage(thread_id, WM_QUIT, 0, 0);
- vlog.debug("waiting for WMHooks thread");
+ vlog.debug("Waiting for WMHooks thread");
wait();
}
diff --git a/win/vncconfig/Connections.h b/win/vncconfig/Connections.h
index a540bd76..68a4980d 100644
--- a/win/vncconfig/Connections.h
+++ b/win/vncconfig/Connections.h
@@ -89,7 +89,7 @@ namespace rfb {
ConnectionsPage(const RegKey& rk)
: PropSheetPage(GetModuleHandle(nullptr), MAKEINTRESOURCE(IDD_CONNECTIONS)), regKey(rk) {}
void initDialog() override {
- vlog.debug("set IDC_PORT %d", (int)port_number);
+ vlog.debug("Set IDC_PORT %d", (int)port_number);
setItemInt(IDC_PORT, port_number ? port_number : 5900);
setItemChecked(IDC_RFB_ENABLE, port_number != 0);
setItemInt(IDC_IDLE_TIMEOUT, rfb::Server::idleTimeout);
diff --git a/win/vncconfig/Legacy.cxx b/win/vncconfig/Legacy.cxx
index 9300bb05..5c9dac3a 100644
--- a/win/vncconfig/Legacy.cxx
+++ b/win/vncconfig/Legacy.cxx
@@ -143,10 +143,10 @@ void LegacyPage::LoadPrefs()
try {
RegKey userKey;
userKey.openKey(winvnc3, "Default");
- vlog.info("loading Default prefs");
+ vlog.info("Loading default prefs");
LoadUserPrefs(userKey);
} catch(rdr::Exception& e) {
- vlog.error("error reading Default settings:%s", e.str());
+ vlog.error("Error reading default settings:%s", e.str());
}
// Open the local, user-specific settings
@@ -154,10 +154,10 @@ void LegacyPage::LoadPrefs()
try {
RegKey userKey;
userKey.openKey(winvnc3, username.c_str());
- vlog.info("loading local User prefs");
+ vlog.info("Loading local user prefs");
LoadUserPrefs(userKey);
} catch(rdr::Exception& e) {
- vlog.error("error reading local User settings:%s", e.str());
+ vlog.error("Error reading local user settings:%s", e.str());
}
// Open the user's own settings
@@ -165,10 +165,10 @@ void LegacyPage::LoadPrefs()
try {
RegKey userKey;
userKey.openKey(HKEY_CURRENT_USER, "Software\\ORL\\WinVNC3");
- vlog.info("loading global User prefs");
+ vlog.info("Loading global user prefs");
LoadUserPrefs(userKey);
} catch(rdr::Exception& e) {
- vlog.error("error reading global User settings:%s", e.str());
+ vlog.error("Error reading global user settings:%s", e.str());
}
}
}
diff --git a/win/vncconfig/vncconfig.cxx b/win/vncconfig/vncconfig.cxx
index b16ff1e4..606da68d 100644
--- a/win/vncconfig/vncconfig.cxx
+++ b/win/vncconfig/vncconfig.cxx
@@ -164,7 +164,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE /*prev*/, char* /*cmdLine*/, int /*
PropSheet sheet(inst, propSheetTitle, pages, icon);
#ifdef _DEBUG
- vlog.debug("capture dialogs=%s", captureDialogs ? "true" : "false");
+ vlog.debug("Capture dialogs=%s", captureDialogs ? "true" : "false");
sheet.showPropSheet(nullptr, true, false, captureDialogs);
#else
sheet.showPropSheet(nullptr, true, false);
diff --git a/win/winvnc/ManagedListener.cxx b/win/winvnc/ManagedListener.cxx
index adc074cf..3a56205c 100644
--- a/win/winvnc/ManagedListener.cxx
+++ b/win/winvnc/ManagedListener.cxx
@@ -48,7 +48,7 @@ ManagedListener::~ManagedListener() {
void ManagedListener::setServer(rfb::VNCServer* svr) {
if (svr == server)
return;
- vlog.info("set server to %p", svr);
+ vlog.info("Set server to %p", svr);
server = svr;
refresh();
}
@@ -56,14 +56,14 @@ void ManagedListener::setServer(rfb::VNCServer* svr) {
void ManagedListener::setPort(int port_, bool localOnly_) {
if ((port_ == port) && (localOnly == localOnly_))
return;
- vlog.info("set port to %d", port_);
+ vlog.info("Set port to %d", port_);
port = port_;
localOnly = localOnly_;
refresh();
}
void ManagedListener::setFilter(const char* filterStr) {
- vlog.info("set filter to %s", filterStr);
+ vlog.info("Set filter to %s", filterStr);
delete filter;
filter = new network::TcpFilter(filterStr);
if (!sockets.empty() && !localOnly) {
diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx
index 845ee854..f5343977 100644
--- a/win/winvnc/VNCServerWin32.cxx
+++ b/win/winvnc/VNCServerWin32.cxx
@@ -327,7 +327,7 @@ void VNCServerWin32::processEvent(HANDLE event_) {
break;
default:
- vlog.error("unknown command %d queued", command);
+ vlog.error("Unknown command %d queued", command);
};
// Clear the command and signal completion
diff --git a/win/winvnc/winvnc.cxx b/win/winvnc/winvnc.cxx
index e2abae19..653ec675 100644
--- a/win/winvnc/winvnc.cxx
+++ b/win/winvnc/winvnc.cxx
@@ -199,9 +199,9 @@ static void processParams(int argc, char** argv) {
} else if (strcasecmp(argv[i], "-noconsole") == 0) {
close_console = true;
- vlog.info("closing console");
+ vlog.info("Closing console");
if (!FreeConsole())
- vlog.info("unable to close console:%lu", GetLastError());
+ vlog.info("Unable to close console:%lu", GetLastError());
} else if ((strcasecmp(argv[i], "-help") == 0) ||
(strcasecmp(argv[i], "--help") == 0) ||