views:

686

answers:

3

Hello.

I'm trying to debug shell extension (IContextMenu) in Windows 7 with Visual C++ 2008. I have set DesktopProcess=1 in the registry and set host app to explorer.exe. But when I start the debugger, it launches explorer.exe and then detaches from the process. DllMain of the shell extension isn't called.

The same code with exactly the same settings launched in debugger without any problems in Windows XP + Visual C++ 2008.

Any thoughts how to debug the shell extension in Win7?

+1  A: 

Try launching explorer and THEN attaching the debugger to it.

snowdude
A: 

You could try putting a DebugBreak() call in your code. This should launch the just-in-time debugger at the call and give you an idea of what is going on.

Corwin Joy
A: 

You should take a look at gflags.exe, part of the standard debugging tools sdk. It's got all the options you need to configure (global)flags for any process startup/services/heap/pool-tagging/stacktrace's-on-allocation etc...

RandomNickName42