diff options
-rw-r--r-- | vdagent/desktop_layout.cpp | 2 | ||||
-rw-r--r-- | vdagent/vdagent.cpp | 2 | ||||
-rw-r--r-- | vdservice/vdservice.cpp | 9 |
3 files changed, 7 insertions, 6 deletions
diff --git a/vdagent/desktop_layout.cpp b/vdagent/desktop_layout.cpp index 3b474d1..7cb2f4b 100644 --- a/vdagent/desktop_layout.cpp +++ b/vdagent/desktop_layout.cpp @@ -258,7 +258,7 @@ bool DesktopLayout::init_dev_mode(LPCTSTR dev_name, DEVMODE* dev_mode, DisplayMo custom.bpp = mode->_depth; hdc = CreateDC(dev_name, NULL, NULL, NULL); if (!hdc) { - vd_printf("failed to create DC: %s", dev_name); + vd_printf("failed to create DC"); } else { int err = ExtEscape(hdc, QXL_ESCAPE_SET_CUSTOM_DISPLAY, sizeof(QXLEscapeSetCustomDisplay), (LPCSTR)&custom, 0, NULL); diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp index eb6ffd4..b8bad44 100644 --- a/vdagent/vdagent.cpp +++ b/vdagent/vdagent.cpp @@ -938,7 +938,7 @@ void VDAgent::on_clipboard_request(UINT format) case WAIT_TIMEOUT: break; default: - vd_printf("Wait error (%d)\n", GetLastError()); + vd_printf("Wait error (%lu)\n", GetLastError()); return; } } while (GetTickCount() < start_tick + VD_CLIPBOARD_TIMEOUT_MS); diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.cpp index 717215f..696f3da 100644 --- a/vdservice/vdservice.cpp +++ b/vdservice/vdservice.cpp @@ -211,7 +211,8 @@ VDService::~VDService() bool VDService::run() { #ifndef DEBUG_VDSERVICE - SERVICE_TABLE_ENTRY service_table[] = {{VD_SERVICE_NAME, main}, {0, 0}}; + SERVICE_TABLE_ENTRY service_table[] = { + {const_cast<LPTSTR>(VD_SERVICE_NAME), main}, {0, 0}}; return !!StartServiceCtrlDispatcher(service_table); #else main(0, NULL); @@ -241,7 +242,7 @@ bool VDService::install() 0, 0, 0, 0); if (service) { SERVICE_DESCRIPTION descr; - descr.lpDescription = VD_SERVICE_DESCRIPTION; + descr.lpDescription = const_cast<LPTSTR>(VD_SERVICE_DESCRIPTION); if (!ChangeServiceConfig2(service, SERVICE_CONFIG_DESCRIPTION, &descr)) { printf("ChangeServiceConfig2 failed\n"); } @@ -854,7 +855,7 @@ bool VDService::launch_agent() ZeroMemory(&startup_info, sizeof(startup_info)); startup_info.cb = sizeof(startup_info); - startup_info.lpDesktop = TEXT("Winsta0\\winlogon"); + startup_info.lpDesktop = const_cast<LPTSTR>(TEXT("Winsta0\\winlogon")); ZeroMemory(&_agent_proc_info, sizeof(_agent_proc_info)); if (_system_version == SYS_VER_WIN_XP_CLASS) { if (_session_id == 0) { @@ -873,7 +874,7 @@ bool VDService::launch_agent() } } } else if (_system_version == SYS_VER_WIN_7_CLASS) { - startup_info.lpDesktop = TEXT("Winsta0\\default"); + startup_info.lpDesktop = const_cast<LPTSTR>(TEXT("Winsta0\\default")); ret = create_process_as_user(_session_id, _agent_path, _agent_path, NULL, NULL, FALSE, 0, NULL, NULL, &startup_info, &_agent_proc_info); } else { |