]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/utilsexc.cpp
   1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     Execution-related utilities 
   4 // Author:      Stefan Csomor 
   8 // Copyright:   (c) Stefan Csomor 
   9 // Licence:       wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  12 #include "wx/wxprec.h" 
  16 #endif //ndef WX_PRECOMP 
  20 #include "wx/mac/private.h" 
  21 #include "LaunchServices.h" 
  23 long wxExecute(const wxString
& command
, int flags
, wxProcess 
*WXUNUSED(handler
)) 
  25     wxASSERT_MSG( flags 
== wxEXEC_ASYNC
, 
  26         wxT("wxExecute: Only wxEXEC_ASYNC is supported") ); 
  30     err 
= wxMacPathToFSRef( command 
, &fsRef 
) ; 
  33         err 
= LSOpenFSRef( &fsRef 
, NULL 
) ; 
  36     // 0 means execution failed. Returning non-zero is a PID, but not 
  37     // on Mac where PIDs are 64 bits and won't fit in a long, so we 
  38     // return a dummy value for now. 
  39     return ( err 
== noErr 
) ? -1 : 0; 
  42 #endif //ndef __DARWIN__