Jay
Jay

Reputation: 24895

How to avoid context menu handler application from blocking the explorer?

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.

Upvotes: 1

Views: 230

Answers (2)

Jay
Jay

Reputation: 24895

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.

Upvotes: 1

Ana Betts
Ana Betts

Reputation: 74654

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

Upvotes: 0

Related Questions