#endif
#include <stdarg.h>
-#include "wx/dde.h" // for WX_DDE hack in wxExecute
+#if wxUSE_IPC
+ #include "wx/dde.h" // for WX_DDE hack in wxExecute
+#endif // wxUSE_IPC
// ----------------------------------------------------------------------------
// constants
return DefWindowProc(hWnd, message, wParam, lParam);
}
}
-#endif
+#endif // Win32
long wxExecute(const wxString& cmd, bool sync, wxProcess *handler)
{
wxCHECK_MSG( !!cmd, 0, wxT("empty command in wxExecute") );
+ wxString command;
+#if wxUSE_IPC
// DDE hack: this is really not pretty, but we need to allow this for
// transparent handling of DDE servers in wxMimeTypesManager. Usually it
// returns the command which should be run to view/open/... a file of the
// keep all this well hidden from the application, we allow a special form
// of command: WX_DDE:<command>:DDE_SERVER:DDE_TOPIC:DDE_COMMAND in which
// case we execute just <command> and process the rest below
- wxString command, ddeServer, ddeTopic, ddeCommand;
+ wxString ddeServer, ddeTopic, ddeCommand;
static const size_t lenDdePrefix = 7; // strlen("WX_DDE:")
if ( cmd.Left(lenDdePrefix) == _T("WX_DDE#") )
{
}
}
else
+#endif // wxUSE_IPC
{
// no DDE
command = cmd;
return pi.dwProcessId;
}
+#if wxUSE_IPC
// second part of DDE hack: now establish the DDE conversation with the
// just launched process
if ( !!ddeServer )
wxLogError(_("Couldn't launch DDE server '%s'."), command.c_str());
}
}
+#endif // wxUSE_IPC
if ( !sync )
{