msxml3: generate 64-bit msxml3r.dll resource stub for win64 prefixes#2497
Open
SurenIV wants to merge 1 commit intoWinetricks:masterfrom
Open
msxml3: generate 64-bit msxml3r.dll resource stub for win64 prefixes#2497SurenIV wants to merge 1 commit intoWinetricks:masterfrom
SurenIV wants to merge 1 commit intoWinetricks:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #2231 with a different approach.
The current load_msxml3() installs the 32-bit msxml3r.dll (resource-only DLL) from msxml3.msi (SP7), and then updates msxml3.dll itself to the SP11 version from win7sp1 for both architectures. However, the 64-bit msxml3r.dll is never installed:
After winetricks msxml3 in a win64 prefix:
Without the 64-bit msxml3r.dll, the native msxml3.dll fails to load as a COM server:
err:ole:apartment_add_dll couldn't load in-process dll L"C:\windows\system32\msxml3.dll"
On Windows 7, msxml3r.dll is a 2 KB MUI stub (part of the OS image, not distributed in any update). The actual string resources are in en-US/msxml3r.dll.mui (43 KB). I verified this by extracting both files from a Windows 7 SP1 x64 install.wim.
According to Microsoft's https://learn.microsoft.com/en-us/previous-versions/troubleshoot/msxml/list-of-xml-parser-versions, msxml3r.dll was shipped with MSXML 3.0 through SP11 (version 8.110.7600.16385). The final version (Post SP11, 8.110.7600.16605) no longer ships msxml3r.dll — resources were embedded into the main DLL.
The 64-bit msxml3r.dll contains only two resources:
The native msxml3.dll checks for a valid msxml3r.dll during DllMain initialization. If the file is missing or has an invalid PE resource structure, DllMain returns FALSE and the DLL is unloaded.
Since there is no publicly available download source for this file, this PR generates a minimal 64-bit PE32+ resource-only DLL at install time using base64 (part of coreutils, already used indirectly by winetricks). The generated DLL (2048 bytes, 2732 chars base64) contains:
The DLL is not a copy of any Microsoft binary — it was generated from scratch following the https://learn.microsoft.com/en-us/windows/win32/debug/pe-format and https://learn.microsoft.com/en-us/windows/win32/intl/multilingual-user-interface. VERSION_INFO metadata uses "Wine Project" as CompanyName and "Generated for Wine compatibility" as LegalCopyright.
generate_msxml3r.py