Results 1 to 7 of 7

Thread: vb6 always loads the wrong dll msxml6 version

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    3

    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.

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: vb6 always loads the wrong dll msxml6 version

    Quote Originally Posted by LuckyRid View Post
    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.

    Quote Originally Posted by LuckyRid View Post
    ... 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.

  3. #3
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  4. #4
    New Member
    Join Date
    Apr 2013
    Posts
    1

    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.

  5. #5
    New Member
    Join Date
    Jan 2017
    Posts
    1

    Re: vb6 always loads the wrong dll msxml6 version

    Quote Originally Posted by trailway View Post
    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?

  6. #6
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,734

    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

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    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
  •  



Click Here to Expand Forum to Full Width