ShellExecute: Exception 0x80004002
From: Christoph Stoepel (Stoepel_at_discussions.microsoft.com)
Date: 08/10/04
- Next message: Brett: "Windows Power States and memory access"
- Previous message: Mohun Biswas: "Re: comparing PE files with CRC/checksum"
- Next in thread: Vladimir Scherbina: "Re: ShellExecute: Exception 0x80004002"
- Reply: Vladimir Scherbina: "Re: ShellExecute: Exception 0x80004002"
- Reply: David Lowndes: "Re: ShellExecute: Exception 0x80004002"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 10 Aug 2004 09:15:08 -0700
Hi,
i have a strange problem and cannot find a solution (i tried manuals, msdn,
google...).
I want my MFC42 App (still VS6 User for C++) to open a Website in default
browser. Therefore I use
::ShellExecute(AfxGetMainWnd()->GetSafeHwnd(), _T("open"), (LPCTSTR)strURL,
NULL, NULL, SW_SHOWNORMAL);
When I execute it, nothing happens (neither in Debug nor in Release mode).
The Debugger shows the following lines
"C:\WINDOWS\system32\apphelp.dll" wurde geladen. ...
"C:\WINDOWS\system32\shdocvw.dll" wurde geladen. ...
"C:\WINDOWS\system32\actxprxy.dll" wurde geladen. ...
Nicht abgefangene Ausnahme in MyApp.exe (KERNEL32.DLL): 0x80004002: (kein
Name).
Nicht abgefangene Ausnahme in MyApp.exe (KERNEL32.DLL): 0x80004002: (kein
Name).
Which means in in English: DLLs loaded and then first chance exception in
Kernel32.dll.
Strange is:
- When I use the same line in other Apps, it works
- In this special program, ShellExecute returns SE_ERR_ACCESSDENIED
- When I use full path for browser
(HKEY_CLASSES_ROOT\\http\\shell\\open\\command) it works again
//::ShellExecute(NULL, NULL, strBrowser, strURL, NULL, SW_SHOWNORMAL);
I have no special compiler/linker options set in this program, so why do I
get this Exception? I think somewhere, I get harder security restrictions,
but I dont know how and with what commands.
Here is my init code:
BOOL CMyApp::InitInstance()
{
InitCommonControls();
CoInitializeEx(NULL, COINIT_MULTITHREADED);
AfxEnableControlContainer();
AfxInitRichEdit();
Enable3dControls();
...
Hope someone has an idea.
Christoph
- Next message: Brett: "Windows Power States and memory access"
- Previous message: Mohun Biswas: "Re: comparing PE files with CRC/checksum"
- Next in thread: Vladimir Scherbina: "Re: ShellExecute: Exception 0x80004002"
- Reply: Vladimir Scherbina: "Re: ShellExecute: Exception 0x80004002"
- Reply: David Lowndes: "Re: ShellExecute: Exception 0x80004002"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|