Keyboard shortcut hangs explorer for 30 seconds but mouse right click works!

N

nandan

I am writing an Excel addin that uses a C++ Shim and .NET.

I can usually, i.e, except in the situation below, use the Windows
key-E shortcut to launch Windows explorer.

When I log into my Excel addin if i immediately try to use the Windows
key shortcut to launch windows explorer (Windows Key - E) then for 30
seconds i will not see an explorer window. AFter 30 seconds it shows up
fine.
During this time i cannot access the start button or the taskbar and
things appear to have hung.

My addin authenticates the login information using my webserver and
returns immediately. During this login process i also do some COM
interop.I can access all of Excels menus and can alt-tab between any
open applications. Only the windows explorer doesn't show up and i
cannot access the task bar.

But here's the kicker.
If instead of doing Windows-E , i instead use the mouse, and do a right
click and choose explore, windows explorer loads up just fine.
Immediately.

I have disabled my virus scanner, and disconnected and removed all
mapped drives.
I ran process monitor from sysinternals, and it appears that the last
thing Windows explorer does is look up this registry key
HKCR\Folder\shell\explore\ddeexec\topic before all things halt for 30
seconds.

I notice that if, in Excels file associations if i disable DDE, then
Explorer launches just fine.

Can someone please shed some light on what is going on ?
Why is Excels DDE setting appear to affect Windows Explorer?
And underneath the hood , what is the difference between launching
Windows explorer using the mouse and the keyboard ?
This problem has frustrated me for three weeks now..
 
N

nandan

I found out what specifically is causing the 30 second hang, but i
don't understand why.
In my Excel code i call dotNEts QueueUserWorkItem function and in the
threadpool thread i display a form (that closes itselft after 5
seconds). Its a "splash screen"

Invoking QueueUserWorkItem is what causes Windows Explorer to hang.
Anyone see a connection ??

If i replace the QueueUserWorkItem with my own thread creation, and
then do a thread.join things work fine.

Perhaps i should post this in a dotNET newsgroup.
Just thought i'd post what i found
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top