https://bugs.winehq.org/show_bug.cgi?id=43490
Bug ID: 43490 Summary: Broken native support for comctl32.dll. Product: Wine Version: 2.14 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: comctl32 Assignee: wine-bugs@winehq.org Reporter: s3141p@gmail.com Distribution: ---
# Summary
Broken native support for comctl32.dll. This results in a number of popular Windows applications partially, or sometime totally, not working anymore, such as IrfanView, Faststone Image Viewer, and XPDF-Xchange viewer. I confirmed that both wine 2.10 2.13, and 2.14 exhibit the same problem. I hypothesize that this issue was introduced in wine 2.8 following the changes for fake dll generation that were announced in https://www.wine-staging.com/news/2017-05-16-release-2.8.html.
# Reproducing this issue
1. Install 32-bit wine 2.14. 2. Install 32-bit IrfanView 4.44 - latest version as of this writing. 3. Install `winetricks comctl32` - Microsoft COM control DLL 5.8 for Windows XP, year 2001.
Note: #2 and #3 have worked together for me for all wine versions up to 2.6 (I skipped 2.8-9, and 2.11-12).
4. Run IrfanView, select menu entry File > Open; IrfanView crashes. Terminal output shows this message:
``` err:wineboot:ProcessRunKeys Error running cmd L"C:\windows\system32\winemenubuilder.exe -a -r" (2) err:module:DelayLoadFailureHook failed to delay load comctl32.dll.HIMAGELIST_QueryInterface wine: Call from 0x7b4367c6 to unimplemented function comctl32.dll.HIMAGELIST_QueryInterface, aborting wine: Unimplemented function comctl32.dll.HIMAGELIST_QueryInterface called at address 0x2e0023:0x7b4367c6 (thread 0031), starting debugger... fixme:service:QueryServiceConfig2W Level 6 not implemented fixme:service:QueryServiceConfig2W Level 6 not implemented fixme:service:QueryServiceConfig2W Level 6 not implemented fixme:service:QueryServiceConfig2W Level 6 not implemented fixme:service:QueryServiceConfig2W Level 6 not implemented fixme:ntdll:EtwEventUnregister (deadbeef) stub. ```
Of course, the Microsoft Windows XP comctl32.dll doesn't implement HIMAGELIST_QueryInterface, which, according to https://msdn.microsoft.com/en-us/library/windows/desktop/bb761510(v=vs.85).a... requires at least Windows Vista. The corresponding wine API is documented in https://source.winehq.org/WineAPI/HIMAGELIST_QueryInterface.html.
Other examples of Windows applications that fail with the same message include: * PDF-Xchange Viewer version 2.5 - it doesn't start at all. * FastStone Image Viewer 6.2 - it hangs with an hourglass mouse pointer.
The obvious work-around is not to load the native comctl32.dll and rely entirely on the built-in dll. While this works, as it has always worked in the past, the native implementation lacks enough functionality that at least IrfanView and Faststone image capture do not work well. That is why several forum threads recommend using Microsoft's comctr32.dll for such applications. For IrfanView, the impairment is mainly cosmetic, so it can be tolerated. Faststone Image Capture, however, can't display thumbnails past the first screenful (about 20-30 pictures) if the native comctl32 DLL isn't loaded.
# Conclusion
IrfanView and other important Windows applications fail to work partially or entirely when the native comctl32.dll is loaded. Before version wine 2.10 (possibly 2.8) they all worked without a glitch. The native comctl32.dll is still needed for full application compatibility because the built-in replacement DLL lacks some functionality (tested with wine 2.14).