]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dde.cpp
applying patch, fixes #10523
[wxWidgets.git] / src / msw / dde.cpp
index 7604068ac6c1513ec4dd1f17f2a0c13b466bdbc0..20bbe4bb239c542667674b5f828a1127a6c85114 100644 (file)
@@ -418,7 +418,7 @@ wxConnectionBase *wxDDEClient::MakeConnection(const wxString& WXUNUSED(host),
 
     if ( !hszServer )
     {
 
     if ( !hszServer )
     {
-        return (wxConnectionBase*) NULL;
+        return NULL;
     }
 
 
     }
 
 
@@ -427,7 +427,7 @@ wxConnectionBase *wxDDEClient::MakeConnection(const wxString& WXUNUSED(host),
     if ( !hszTopic )
     {
         DDEFreeString(hszServer);
     if ( !hszTopic )
     {
         DDEFreeString(hszServer);
-        return (wxConnectionBase*) NULL;
+        return NULL;
     }
 
 
     }
 
 
@@ -457,7 +457,7 @@ wxConnectionBase *wxDDEClient::MakeConnection(const wxString& WXUNUSED(host),
         }
     }
 
         }
     }
 
-    return (wxConnectionBase*) NULL;
+    return NULL;
 }
 
 wxConnectionBase *wxDDEClient::OnMakeConnection()
 }
 
 wxConnectionBase *wxDDEClient::OnMakeConnection()
@@ -557,8 +557,8 @@ wxDDEConnection::DoExecute(const void *data, size_t size, wxIPCFormat format)
                  _T("wxDDEServer::Execute() supports only text data") );
 
     wxMemoryBuffer buffer;
                  _T("wxDDEServer::Execute() supports only text data") );
 
     wxMemoryBuffer buffer;
-    LPBYTE realData wxDUMMY_INITIALIZE(NULL);
-    size_t realSize wxDUMMY_INITIALIZE(0);
+    LPBYTE realData = NULL;
+    size_t realSize = 0;
     wxMBConv *conv = NULL;
 
     // Windows only supports either ANSI or UTF-16 format depending on the
     wxMBConv *conv = NULL;
 
     // Windows only supports either ANSI or UTF-16 format depending on the
@@ -636,16 +636,16 @@ wxDDEConnection::DoExecute(const void *data, size_t size, wxIPCFormat format)
 
     DWORD result;
     bool ok = DdeClientTransaction(realData,
 
     DWORD result;
     bool ok = DdeClientTransaction(realData,
-                                    realSize,
-                                    GetHConv(),
-                                    NULL,
-                                    // MSDN: if the transaction specified by
-                                    // the wType parameter does not pass data
-                                    // or is XTYP_EXECUTE, wFmt should be zero.
-                                    0,
-                                    XTYP_EXECUTE,
-                                    DDE_TIMEOUT,
-                                    &result) != 0;
+                                   realSize*sizeof(wxChar),
+                                   GetHConv(),
+                                   NULL,
+                                   // MSDN: if the transaction specified by
+                                   // the wType parameter does not pass data
+                                   // or is XTYP_EXECUTE, wFmt should be zero.
+                                   0,
+                                   XTYP_EXECUTE,
+                                   DDE_TIMEOUT,
+                                   &result) != 0;
 
     if ( !ok )
     {
 
     if ( !ok )
     {