Link to home
Start Free TrialLog in
Avatar of TheIronDuke
TheIronDuke

asked on

Context menu shell extension crashes Windows explorer

I created a x64 context menu shell extension in C++, which works fine when I right click a file or folder in the file list. But when I right click on a directory in the directory tree on the left Windows Explorer crashes, with no error details.

Any idea what can cause this to happen only in the directory tree?
Avatar of Zoppo
Zoppo
Flag of Germany image

Hi TheIronDuke,

no, I have no idea, but I'm sure it crash's because there's some error in your shell-extension - so IMO you need to debug it.

To do this you need to change the project's Debug-Settings and enter 'explorer.exe' as 'command path'.

Unfortunateley this doesn't work (because calling explorer.exe doesn't usually start a new process) without one of these extra steps:

- you can shutdown the currently running explorer.exe, then start debugging, this should start explorer.exe again - after you finished debugging you'll have to re-start explorer.exe manually to re-activate your desktop and taskbar.
- configure system settings to allow using multiple explorer.exe processes - you can find how this can be done in the section 'Running and Testing Shell Extensions' at https://msdn.microsoft.com/de-de/library/windows/desktop/cc144064(v=vs.85).aspx

I hope this helps,

ZOPPO
Avatar of TheIronDuke
TheIronDuke

ASKER

Thanks, but I have been debugging. It has not shown a logical cause. The question is; why does right clicking on a file or directory on the file list side (right side) work just fine, but right clicking on the directory tree on the left crashes. What is different about the two? I thought they would both work the same way in a context menu handler.

I really need some insight here.
ASKER CERTIFIED SOLUTION
Avatar of TheIronDuke
TheIronDuke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Only one response, which really did not address the problem. I know I have to debug the app. I was looking for some help, but did not get it. So I found the solution myself.