summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-11-09 17:14:57 +0100
committerPierre Ossman <ossman@cendio.se>2018-11-09 17:16:04 +0100
commit8526e4807379ed35e3461da6793256af8c1ff6cf (patch)
tree64230f0e5ff06c71ed2ccf07a5b2386df39ad649 /win
parent025326dd94070ba790e4c1f8596b93ce96fd5be4 (diff)
downloadtigervnc-8526e4807379ed35e3461da6793256af8c1ff6cf.tar.gz
tigervnc-8526e4807379ed35e3461da6793256af8c1ff6cf.zip
Stop trying to send ListConnInfo via WM_COPYDATA
Windows tries to do a copy of it, and it is too complex to survive that. Just reference the object directly as we know the source of the message here.
Diffstat (limited to 'win')
-rw-r--r--win/winvnc/ControlPanel.cxx4
-rw-r--r--win/winvnc/STrayIcon.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/win/winvnc/ControlPanel.cxx b/win/winvnc/ControlPanel.cxx
index e7262287..72831e55 100644
--- a/win/winvnc/ControlPanel.cxx
+++ b/win/winvnc/ControlPanel.cxx
@@ -140,6 +140,8 @@ void ControlPanel::SendCommand(DWORD command, int data)
{
COPYDATASTRUCT copyData;
copyData.dwData = command;
+ copyData.cbData = 0;
+ copyData.lpData = 0;
getSelConnInfo();
if (data != -1) {
ListConnStatus.Copy(&ListSelConn);
@@ -148,8 +150,6 @@ void ControlPanel::SendCommand(DWORD command, int data)
} else {
ListConnStatus.Clear();
}
- copyData.cbData = 0;
- copyData.lpData = &ListConnStatus;
SendMessage(m_hSTIcon, WM_COPYDATA, 0, (LPARAM)&copyData);
}
diff --git a/win/winvnc/STrayIcon.cxx b/win/winvnc/STrayIcon.cxx
index fa483ee0..a90819d0 100644
--- a/win/winvnc/STrayIcon.cxx
+++ b/win/winvnc/STrayIcon.cxx
@@ -184,7 +184,7 @@ public:
case 2:
return thread.server.disconnectClients("IPC disconnect") ? 1 : 0;
case 3:
- thread.server.setClientsStatus((ListConnInfo *)command->lpData);
+ thread.server.setClientsStatus(&CPanel->ListConnStatus);
case 4:
thread.server.getClientsInfo(&LCInfo);
CPanel->UpdateListView(&LCInfo);