X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/45e6e6f8ab806b337dffeb3b52fec7eba3c845ef..ed37526d668681815114e90b1bd9c2303127e8eb:/samples/ipc/client.cpp?ds=sidebyside diff --git a/samples/ipc/client.cpp b/samples/ipc/client.cpp index 9141746c4a..25dc58e45c 100644 --- a/samples/ipc/client.cpp +++ b/samples/ipc/client.cpp @@ -337,8 +337,8 @@ void MyFrame::OnExecute(wxCommandEvent& WXUNUSED(event)) { wxString s = _T("Date"); - m_client->GetConnection()->Execute((wxChar *)s.c_str()); - m_client->GetConnection()->Execute((wxChar *)s.c_str(), (s.Length() + 1) * sizeof(wxChar)); + m_client->GetConnection()->Execute((const wxChar *)s.c_str()); + m_client->GetConnection()->Execute((const wxChar *)s.c_str(), (s.Length() + 1) * sizeof(wxChar)); #if wxUSE_DDE_FOR_IPC wxLogMessage(_T("DDE Execute can only be used to send text strings, not arbitrary data.\nThe type argument will be ignored, text truncated, converted to Unicode and null terminated.")); #endif @@ -353,9 +353,9 @@ void MyFrame::OnPoke(wxCommandEvent& WXUNUSED(event)) if (m_client->IsConnected()) { wxString s = wxDateTime::Now().Format(); - m_client->GetConnection()->Poke(_T("Date"), (wxChar *)s.c_str()); + m_client->GetConnection()->Poke(_T("Date"), (const wxChar *)s.c_str()); s = wxDateTime::Now().FormatTime() + _T(" ") + wxDateTime::Now().FormatDate(); - m_client->GetConnection()->Poke(_T("Date"), (wxChar *)s.c_str(), (s.Length() + 1) * sizeof(wxChar)); + m_client->GetConnection()->Poke(_T("Date"), (const wxChar *)s.c_str(), (s.Length() + 1) * sizeof(wxChar)); char bytes[3]; bytes[0] = '1'; bytes[1] = '2'; bytes[2] = '3'; m_client->GetConnection()->Poke(_T("bytes[3]"), (wxChar *)bytes, 3, wxIPC_PRIVATE); @@ -417,7 +417,7 @@ MyClient::~MyClient() // ---------------------------------------------------------------------------- void MyConnection::Log(const wxString& command, const wxString& topic, - const wxString& item, wxChar *data, int size, wxIPCFormat format) + const wxString& item, const wxChar *data, int size, wxIPCFormat format) { wxString s; if (topic.IsEmpty() && item.IsEmpty()) @@ -475,7 +475,7 @@ wxChar *MyConnection::Request(const wxString& item, int *size, wxIPCFormat forma return data; } -bool MyConnection::Poke(const wxString& item, wxChar *data, int size, wxIPCFormat format) +bool MyConnection::Poke(const wxString& item, const wxChar *data, int size, wxIPCFormat format) { Log(_T("Poke"), wxEmptyString, item, data, size, format); return wxConnection::Poke(item, data, size, format);