views:

18

answers:

2

I have created an application for which can be invoked through context menu by deriving from IContextMenu and IShellExtInit. I register the DLL and when I right click the application gets invoked.

But, the problem is till my application gets over, I cannot access any other file in that explorer. Explorer is effectively blocked till my application finishes.

The same behaviour is not reflected in other such applications like WinZip, WinRar etc.

How to avoid the my application from blocking the explorer?

Any pointers in that direction will be quite helpful.

A: 

Attach the debugger to Explorer and look for a thread that has your DLL in the call stack, then see what it's blocked on

Paul Betts
But, till my application completes it's activity explorer will be blocked right? I am not talking of an abnormal scenario, I am talking of positive scenario where my application executes and exits. But, till it exits explorer is blocked and doesn't allow to invoke other applications. How to solve this?
Jay
I don't know, because we don't know what Explorer is blocked on. However, once you actually see a call stack you can *tell*, and perhaps there's something you can do to fix it.
Paul Betts
A: 

I found the solution. I should spawn a process when explorer invokes my DLL so that my process can continue seperately while explorer can continue it's execution without getting blocked on my logic.

Thanks to Paul Betts for his initial advice.

Jay