On 01/15/2016 01:08 PM, Huw Davies wrote:
On Wed, Jan 13, 2016 at 01:16:42PM +0300, Paul Gofman wrote:
Native OleUnitialize never uninits apartment inited by CoInitializeEx. CoUnitialize after OleInitialize uninits apartment, but Ole is still considered inited.
Signed-off-by: Paul Gofman gofmanp@gmail.com
dlls/ole32/compobj.c | 2 ++ dlls/ole32/ole2.c | 7 +++++ dlls/ole32/tests/compobj.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 90b049a..78fc30d 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -1972,6 +1972,8 @@ void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
if (!--info->inits) {
- if (info->ole_inits)
ERR("uninitializing apartment while Ole is still initialized\n");
This should be a WARN since it's likely to be an application, not a Wine, error.
I intentionally put an ERR here as I thought that most likely the behaviour in this case will be different from native. I also thought it would be easier to catch the source of the problem if this case will be encountered in the real application. I will change it to WARN now.
Thanks, Paul.