On Tue, 19 Nov 2002 steve.lustbader@philips.com wrote:
On 13 Nov 2002 at 14:39, steve.lustbader@philips.com wrote:
One of the threads in my app calls CoInitialize, expecting it to return S_OK (in fact, it's followed by an assert statement requiring that it returns S_OK). When I run it in Wine, however, CoInitialize returns S_FALSE, implying that this thread has already initialized the COM library. Other threads call CoInitialize, but this is the first time that this thread calls it. Does Wine initialize COM differently from Windows? Are the other threads' calls to CoInitialize screwing up this thread's call?
Sort of, the problem is that Wine doesn't support apartments yet, so it doesn't try to keep track of the threads that has called CoInitialize.
Does this mean that COM isn't being initialized properly for the calling thread, or only that it appears not to be initialized properly?
Depends on what you mean by "initialized properly". COM functions still works, but only in a process-wide fashion, oblivious to which thread calls them.