Ok to call CoInitialize in the file dialogs?

Michael Jung mjung at iss.tu-darmstadt.de
Fri Nov 11 03:39:09 CST 2005

Hi Eric,

On Friday 11 November 2005 09:37, Eric Pouech wrote:
> I ran into similar problems in shell32/shellole.c, function
> SHCoCreateInstance.
> Shouldn't when both bLoadFromShell32 and bLoadWithoutCOM are false call
> CoInitialize before CoCreateInstance (I got once a program needing it) ?

It's not obvious to me where we would call CoUninitialize in this case. As I 
understand it, we have to keep COM initialized until the created object is 
destroyed again. The short test program, which I've sent with the initial 
mail, seems to indicate that while COM is initialized inside 
SHBrowseForFolder, it's un-initialized again afterwards.

Michael Jung
mjung at iss.tu-darmstadt.de

More information about the wine-devel mailing list