Reputation: 21
I am referencing MSXML6 (msxml6.dll) in a legacy VB6 application. Whether I use DOMDocument40 or DOMDocument60 I still see msxml4.dll being used along with msxml6.dll. Yet I cannot find anything else in the project that should be using either except where I parse a small configurations.
Why would I see msxml4.dll since it isn't referenced by the project? Does VB6 use msxml4 for something?
Upvotes: 2
Views: 1338
Reputation: 13008
MSXML6 appears to be a new version of MSXML4 in its COM implementation, not just as a "marketing" version number.
Looking at the IDL for both in OLEView you can see this... here are some examples.
MSXML4:
// Generated .IDL file (by the OLE/COM Object Viewer)
//
// typelib filename: msxml4.dll
[
uuid(F5078F18-C551-11D3-89B9-0000F81FE221),
version(4.0),
helpstring("Microsoft XML, v4.0")
]
library MSXML2
{
...
}
[
odl,
uuid(2933BF80-7B36-11D2-B20E-00C04F983E60),
helpstring("Core DOM node interface"),
dual,
nonextensible,
oleautomation
]
interface IXMLDOMNode : IDispatch {
...
}
MSXML6:
// Generated .IDL file (by the OLE/COM Object Viewer)
//
// typelib filename: msxml6.dll
[
uuid(F5078F18-C551-11D3-89B9-0000F81FE221),
version(6.0),
helpstring("Microsoft XML, v6.0")
]
library MSXML2
{
...
}
[
odl,
uuid(2933BF80-7B36-11D2-B20E-00C04F983E60),
helpstring("Core DOM node interface"),
dual,
nonextensible,
oleautomation
]
interface IXMLDOMNode : IDispatch {
...
}
These are just short samples.
Specifically you can see that the UUID's of the library itself and the interfaces are the same. This means that VB6 is able to use these items from either DLL.
If you need to force it to use MSXML6 then I think you need to update the version number in your project's VBP file.
If your project references MSXML4, you should see a line like this:
Reference=*\G{F5078F18-C551-11D3-89B9-0000F81FE221}#4.0#0#..\..\..\Windows\SysWow64\msxml4.dll#Microsoft XML, v4.0
What you want instead is a line like this:
Reference=*\G{F5078F18-C551-11D3-89B9-0000F81FE221}#6.0#0#..\..\..\WINDOWS\System32\msxml6.dll#Microsoft XML, v6.0
The UUID is the same... but the version number (#6.0
) is different.
Upvotes: 1