Ryoji Ohta wrote:
> A smallest sample can be created with Visual C++ easily.
> Win32 Project Wizard
> Executable(Windows) application type
> Then, modify InitInstance and WndProc as I described before.
> I hope that somebody would test it.
Tested and confirmed. But: there's no way around that.
The reason that WaitForInputIdle returns immediately even if your
application hasn't started up completely yet is the fact that
SHGetFileInfo loads some shell dlls (one being TSVN). Even if only one
of those dlls initializes COM (which most have to do) or one of them is
an STA dll, then COM creates a hidden window to synchronize the STA.
Since the shell on Vista calls the extension dlls in multiple threads
(pre-Vista shell only calls them in one thread), COM *has* to create the
hidden window to do the synchronizing.
Your only option here is to use some other mechanism to wait for your
app having started up completely. You could for example call FindWindow
in a loop (which times out, to make sure your app won't hang if the
started app doesn't start up correctly).
Note: this doesn't just happen on Vista, it can happen on earlier OS as
well if your app initializes COM multithreaded (ok, most don't, but some
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
Received on 2008-04-17 18:13:48 CEST