]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/ipc/client.cpp
Reverted unnecessary fix
[wxWidgets.git] / samples / ipc / client.cpp
index 9141746c4afd46aa2349d350da8585d225d704b2..25dc58e45c676ea5dbcd4ac63e6793d7e7a8b139 100644 (file)
@@ -337,8 +337,8 @@ void MyFrame::OnExecute(wxCommandEvent& WXUNUSED(event))
     {
         wxString s = _T("Date");
 
     {
         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
 #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();
     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();
         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);
         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,
 // ----------------------------------------------------------------------------
 
 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())
 {
     wxString s;
     if (topic.IsEmpty() && item.IsEmpty())
@@ -475,7 +475,7 @@ wxChar *MyConnection::Request(const wxString& item, int *size, wxIPCFormat forma
     return data;
 }
 
     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);
 {
     Log(_T("Poke"), wxEmptyString, item, data, size, format);
     return wxConnection::Poke(item, data, size, format);