|
-
Apr 18th, 2013, 06:07 AM
#1
Thread Starter
New Member
vb6 always loads the wrong dll msxml6 version
Hi
I am trying to get the following code working on Windows 8
Dim objXML As MSXML2.DOMDocument
Dim objNode As MSXML2.IXMLDOMElement
I understand that the version of MSXML6 that comes with windows 8 doesn't expose the DomDocument, so I've copied the win 7 version of the dll onto my win 8 PC. several issues
win 8 wont let me copy the win 7 version over the win 8 version of the file in system32 even though I am an admin account, AND I have ownership of the file. Keeps saying Access denied. May be something else is using it but I can't work out what. I've tried booting in safe mode so not much is running.
I also registered the win 7 version on my win 8 pc in some other folder and added that dll in the references in my project.... it works - but when I reload the project VB is always pointing to the win 8 version and I cant run the code again.
Stumped... please help, someone! thanks all.
-
Apr 18th, 2013, 06:26 AM
#2
Re: vb6 always loads the wrong dll msxml6 version
 Originally Posted by LuckyRid
I understand that the version of MSXML6 that comes with windows 8 doesn't expose the DomDocument...
Are you sure about this? I've never seen such a statement anywhere else. What is your source?
I'd think if this is true at all it only applies to RT (Metro) programs - and that excludes any VB6 program.
 Originally Posted by LuckyRid
... so I've copied the win 7 version of the dll onto my win 8 PC.
You can't just copy system libraries from one OS to another. Windows File Protection will do its best to keep you from making such a mistake whether you are logged on with an Administrators account or not.
It isn't safe to copy system libraries around to funky locations and reregister them there either. I suspect in this case WFP gradually catches up with you and corrects this attempt to break the OS as well.
-
Apr 18th, 2013, 06:37 AM
#3
Re: vb6 always loads the wrong dll msxml6 version
Is your question about MSXML2.DOMDocument vs. MSXML2.DOMDocument60?
If so perhaps Why Version-Independent GUIDs and ProgIDs Were Removed or the entire GUID and ProgID Information section may apply.
-
Apr 26th, 2013, 12:49 PM
#4
New Member
Re: vb6 always loads the wrong dll msxml6 version
You are correct in that Windows 8 changes behavior when you add a COM reference to msxml6.dll.
In all versions of Windows prior to 8 this DLL included classes from previous versions such as DOMDocument. DOMDocument30, and DOMDocument40.
If you want to use DOMDocument then add a COM reference to msxml40.dll which contains this class.
-
Jan 25th, 2017, 03:43 AM
#5
New Member
Re: vb6 always loads the wrong dll msxml6 version
 Originally Posted by trailway
You are correct in that Windows 8 changes behavior when you add a COM reference to msxml6.dll.
In all versions of Windows prior to 8 this DLL included classes from previous versions such as DOMDocument. DOMDocument30, and DOMDocument40.
If you want to use DOMDocument then add a COM reference to msxml40.dll which contains this class.
I have the same problem.
But... we using both DOMDocument30 and DOMDocument60 in our VB project.
So we coudn't use MSXML4.dll (because it not contains DOMDocument60) and not even MSXML6.dll (because it not contains DOMDocument30).
Looks like we have no other choise, but to migrate our project.
But it's a big project (a very big).
Are there any other options?
-
Jan 25th, 2017, 07:26 AM
#6
Re: vb6 always loads the wrong dll msxml6 version
Can't you use late binding? I assume the most used properties and methods are the same over the different versions of MSXML
-
Jan 25th, 2017, 12:03 PM
#7
Re: vb6 always loads the wrong dll msxml6 version
As a general rule, it would be better to start your own thread on this topic rather than add to a thread from several years back. I realize that this thread isn't THAT old, and your problem is closely related, but the point of the question is to get an answer, and the most effective way to get this question answered is to start your own thread on the subject. You get more eyes on the problem that way.
My usual boring signature: Nothing
 
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|