4 Mar
2026
4 Mar
'26
8 a.m.
Nikolay Sivov (@nsivov) commented about dlls/ole32/ole2.c:
TRACE("(%p,%p)\n", hwnd, pDropTarget);
- if (!COM_CurrentApt()) + /* for bug-for-bug compatibility, just verify class existence */ + if (!GetClassInfoW(NULL, OLEDD_DRAGTRACKERCLASS, &wndClass)) { - ERR("COM not initialized\n"); + ERR("OleInitialize not called\n"); return E_OUTOFMEMORY; }
This does not look good in my opinion. To me it looks like checking for some non obvious side effect. If you need to check current-or-mta case, you can use InternalIsProcessInitialized() from combase. We already use it in ole32. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10245#note_131265