- ::ShellExecuteEx(&sei);
-
- const int nResult = (int) sei.hInstApp;
-
- // Firefox returns file not found for some reason, so make an exception
- // for it
- if ( nResult > 32 || nResult == SE_ERR_FNF )
- {
-#ifdef __WXDEBUG__
- // Log something if SE_ERR_FNF happens
- if ( nResult == SE_ERR_FNF )
- wxLogDebug(wxT("SE_ERR_FNF from ShellExecute -- maybe FireFox?"));
-#endif // __WXDEBUG__
- return true;
- }
-#elif defined(__WXCOCOA__)
- // NOTE: We need to call the real implementation from src/cocoa/utils.mm
- // because the code must use Objective-C features.
- return wxCocoaLaunchDefaultBrowser(url, flags);
-#elif defined(__WXMAC__)
- OSStatus err;
- ICInstance inst;
- long int startSel;
- long int endSel;
-
- err = ICStart(&inst, 'STKA'); // put your app creator code here
- if (err == noErr)
- {
- if (err == noErr)
- {
- ConstStr255Param hint = 0;
- startSel = 0;
- endSel = url.length();
- err = ICLaunchURL(inst, hint, url.fn_str(), endSel, &startSel, &endSel);
- if (err != noErr)
- wxLogDebug(wxT("ICLaunchURL error %d"), (int) err);
- }
- ICStop(inst);
- return true;
- }
- else
- {
- wxLogDebug(wxT("ICStart error %d"), (int) err);
- return false;
- }