X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5bd3a2da9573f270564cd035e0cfbf6902cf8750..fa40e7a17559c9328be4e0202c9c87dc7adb562e:/src/msw/utilsexc.cpp diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 6f2ee55757..12a78c001a 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -74,7 +74,9 @@ #endif #include -#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 @@ -177,12 +179,14 @@ LRESULT APIENTRY _EXPORT wxExecuteWindowCbk(HWND hWnd, UINT message, 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 @@ -191,7 +195,7 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) // keep all this well hidden from the application, we allow a special form // of command: WX_DDE::DDE_SERVER:DDE_TOPIC:DDE_COMMAND in which // case we execute just 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#") ) { @@ -247,6 +251,7 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) } } else +#endif // wxUSE_IPC { // no DDE command = cmd; @@ -410,6 +415,7 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) return pi.dwProcessId; } +#if wxUSE_IPC // second part of DDE hack: now establish the DDE conversation with the // just launched process if ( !!ddeServer ) @@ -423,6 +429,7 @@ long wxExecute(const wxString& cmd, bool sync, wxProcess *handler) wxLogError(_("Couldn't launch DDE server '%s'."), command.c_str()); } } +#endif // wxUSE_IPC if ( !sync ) {