ShellExecuteEx fails to open a URL on some devices...

ShellExecuteEx fails to open a URL on some devices...

Post by Nikos Kons » Tue, 15 May 2007 19:32:57


Hi,

I'm opening a URL from my application using ShellExecuteEx as follows:

SHELLEXECUTEINFO cShellExecuteInfo = {0};
cShellExecuteInfo.cbSize = sizeof(SHELLEXECUTEINFO);
cShellExecuteInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
cShellExecuteInfo.hwnd = NULL;
cShellExecuteInfo.lpVerb = L"Open";
cShellExecuteInfo.lpFile = L" http://www.yqcomputer.com/ ";
cShellExecuteInfo.nShow = SW_SHOWNORMAL;
::ShellExecuteEx(&cShellExecuteInfo);

This works fine on most devices but on the T-Mobile MDA PocketPC phone I
get the following error:

---(error)--->>
The file " http://www.yqcomputer.com/ " cannot be opened. Either it is
not signed with a trusted certificate or one of its components cannot be
found. You may need to re-install or restore this file.
<<---(error)---

What could be the reason for this problem?

Thank you,
Nikos.
 
 
 

ShellExecuteEx fails to open a URL on some devices...

Post by ZGJncmlja » Tue, 15 May 2007 22:29:02

Try using \Windows\iexplore.exe as the file name
and the site path as the comman arguments.

See
http://www.yqcomputer.com/

for additional info.

Rick D.
Contractor

 
 
 

ShellExecuteEx fails to open a URL on some devices...

Post by Nikos Kons » Tue, 15 May 2007 23:36:06


Thanks Rick - It does work when specifying the full IE path. Although it
defies the point of using ShellExecuteEx.
 
 
 

ShellExecuteEx fails to open a URL on some devices...

Post by Norman Dia » Wed, 16 May 2007 10:13:38

We don't know what default browser might be set by the OEM or chosen by the
user. The browser's default verb doesn't have to be Open. There's a tiny
chance that setting lpVerb to null might bring a different result.

By the way, in an environment where we knew that the OEM's default browser
was broken, I deliberately invoked Internet Explorer instead. But the
result was worse. Windows CE opened both the default browser AND Internet
Explorer, both displaying the same page.