Applied #10190 (WINCE and wxLaunchDefaultBrowserBaseImpl error)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2009-09-26 20:04:55 +00:00
parent 23899690d3
commit 7b44c10277

View File

@@ -815,17 +815,21 @@ static bool wxLaunchDefaultBrowserBaseImpl(const wxString& url, int flags)
sei.lpVerb = _T("open");
sei.nShow = SW_SHOWNORMAL;
::ShellExecuteEx(&sei);
BOOL nExecResult = ::ShellExecuteEx(&sei);
//From MSDN for wince
//hInstApp member is only valid if the function fails, in which case it
//receives one of the following error values, which are less than or
//equal to 32.
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 )
if ( nResult > 32 || nResult == SE_ERR_FNF || nExecResult == TRUE )
{
#ifdef __WXDEBUG__
// Log something if SE_ERR_FNF happens
if ( nResult == SE_ERR_FNF )
if ( nResult == SE_ERR_FNF || nExecResult == FALSE )
wxLogDebug(wxT("SE_ERR_FNF from ShellExecute -- maybe FireFox?"));
#endif // __WXDEBUG__
return true;