#include "wx/msw/gnuwin32/extra.h"
#endif
+// some compilers headers don't define this one (mingw32)
+#ifndef DMLERR_NO_ERROR
+ #define DMLERR_NO_ERROR (0)
+
+ // this one is also missing from some mingw32 headers, but there is no way
+ // to test for it (I know of) - the test for DMLERR_NO_ERROR works for me,
+ // but is surely not the right thing to do
+ extern "C"
+ HDDEDATA STDCALL DdeClientTransaction(LPBYTE pData,
+ DWORD cbData,
+ HCONV hConv,
+ HSZ hszItem,
+ UINT wFmt,
+ UINT wType,
+ DWORD dwTimeout,
+ LPDWORD pdwResult);
+#endif // no DMLERR_NO_ERROR
+
// ----------------------------------------------------------------------------
// macros and constants
// ----------------------------------------------------------------------------
(PCONVCONTEXT)NULL);
if ( !hConv )
{
- DDELogError(wxString::Format(_("Failed to create connection to "
- "server '%s' on topic '%s'"),
+ DDELogError(wxString::Format(_("Failed to create connection to server '%s' on topic '%s'"),
server.c_str(), topic.c_str()));
}
else
XTYP_EXECUTE,
DDE_TIMEOUT,
&result) != 0;
+
if ( !ok )
{
DDELogError(_T("DDE execute request failed"));
if (data)
{
if (user_size < 0)
- user_size = wxStrlen(data) + 1;
+ user_size = wxStrlen((wxChar*)data) + 1;
HDDEDATA handle = DdeCreateDataHandle(DDEIdInst,
(LPBYTE)data,
connection->OnPoke(connection->m_topicName,
item_name,
- connection->m_bufPtr,
+ (wxChar*)connection->m_bufPtr,
(int)len,
(wxIPCFormat) wFmt);
{
wxASSERT_MSG( DDEIdInst, _T("DDE not initialized") );
- HSZ hsz = DdeCreateStringHandle(DDEIdInst, (char*) s.c_str(), DDE_CP);
+ HSZ hsz = DdeCreateStringHandle(DDEIdInst, (wxChar*) s.c_str(), DDE_CP);
if ( !hsz )
{
DDELogError(_("Failed to create DDE string"));
err = _("a request for a synchronous data transaction has timed out.");
break;
case DMLERR_DLL_NOT_INITIALIZED:
- err = _("a DDEML function was called without first calling the DdeInitialize function,\n\ror an invalid instance identifier\n\rwas passed to a DDEML function.");
+ err = _("a DDEML function was called without first calling the DdeInitialize function,\nor an invalid instance identifier\nwas passed to a DDEML function.");
break;
case DMLERR_DLL_USAGE:
- err = _("an application initialized as APPCLASS_MONITOR has\n\rattempted to perform a DDE transaction,\n\ror an application initialized as APPCMD_CLIENTONLY has \n\rattempted to perform server transactions.");
+ err = _("an application initialized as APPCLASS_MONITOR has\nattempted to perform a DDE transaction,\nor an application initialized as APPCMD_CLIENTONLY has \nattempted to perform server transactions.");
break;
case DMLERR_EXECACKTIMEOUT:
err = _("a request for a synchronous execute transaction has timed out.");
err = _("reentrancy problem.");
break;
case DMLERR_SERVER_DIED:
- err = _("a server-side transaction was attempted on a conversation\n\rthat was terminated by the client, or the server\n\rterminated before completing a transaction.");
+ err = _("a server-side transaction was attempted on a conversation\nthat was terminated by the client, or the server\nterminated before completing a transaction.");
break;
case DMLERR_SYS_ERROR:
err = _("an internal error has occurred in the DDEML.");
err = _("a request to end an advise transaction has timed out.");
break;
case DMLERR_UNFOUND_QUEUE_ID:
- err = _("an invalid transaction identifier was passed to a DDEML function.\n\rOnce the application has returned from an XTYP_XACT_COMPLETE callback,\n\rthe transaction identifier for that callback is no longer valid.");
+ err = _("an invalid transaction identifier was passed to a DDEML function.\nOnce the application has returned from an XTYP_XACT_COMPLETE callback,\nthe transaction identifier for that callback is no longer valid.");
break;
default:
err.Printf(_("Unknown DDE error %08x"), error);