X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2b6da49e2184e17b4993dd37448cf0156d8b143..404b319a85dadd7decf7a5a5331020520031a41c:/src/msw/dde.cpp diff --git a/src/msw/dde.cpp b/src/msw/dde.cpp index 10f0dc792a..e2f7ae6f82 100644 --- a/src/msw/dde.cpp +++ b/src/msw/dde.cpp @@ -580,7 +580,7 @@ wxDDEConnection::DoExecute(const void *data, size_t size, wxIPCFormat format) if ( conv ) { const char * const text = (const char *)data; - const size_t len = size/sizeof(char); + const size_t len = size; realSize = conv->ToWChar(NULL, 0, text, len); if ( realSize == wxCONV_FAILED ) @@ -627,7 +627,7 @@ wxDDEConnection::DoExecute(const void *data, size_t size, wxIPCFormat format) if ( realSize == wxCONV_FAILED ) return false; - realData = (LPBYTE)buffer.GetWriteBuf(realSize*sizeof(char)); + realData = (LPBYTE)buffer.GetWriteBuf(realSize); if ( !realData ) return false; @@ -1068,7 +1068,7 @@ static HSZ DDEAtomFromString(const wxString& s) { wxASSERT_MSG( DDEIdInst, wxT("DDE not initialized") ); - HSZ hsz = DdeCreateStringHandle(DDEIdInst, const_cast(static_cast(s.t_str())), DDE_CP); + HSZ hsz = DdeCreateStringHandle(DDEIdInst, wxMSW_CONV_LPTSTR(s), DDE_CP); if ( !hsz ) { DDELogError(_("Failed to create DDE string"));