Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSXML2.ServerXMLHTTP.4.0 Source?

Where does the object "MSXML2.ServerXMLHTTP.4.0" come from? Which install package?

I'm attempting to do the following:

Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.4.0")

This attempt fails on my development machine (no object is returned) but it is successful on my colleague's development machine. Obviously, he has something installed that I don't or vice versa but where does this object, dll, etc come from?

What would I need to install to get this call to work?

For the record, changing the object to a different version isn't an option because code that this depends on was tested for several days against this specific version. We'd have to go back and test again...

To expand on this question, how can I tell which version of MS XML is currently installed?

like image 562
Frank V Avatar asked Jun 02 '09 20:06

Frank V


1 Answers

Try using this function:-

Function ProgIDInstalled(progID)
    On Error Resume Next
    Dim o : Set o = CreateObject(progID)
    ProgIDInstalled = Err.Number = 0
End Function

If ProgIDInstalled("MSXML2.DOMDocument.3.0") Then
    ' MSXML3 is present   '
End If

If ProgIDInstalled("MSXML2.DOMDocument.4.0") Then
    ' MSXML4 is present   '
End If

If ProgIDInstalled("MSXML2.DOMDocument.5.0") Then
    ' MSXML5 is present   '
End If

If ProgIDInstalled("MSXML2.DOMDocument.6.0") Then
    ' MSXML6 is present   '
End If

It surprises me that even now there are still new developments being made against the 4.0 version. Microsoft are now only patching version 3.0 and version 6.0 MSXML cores.

I know its too late now but really you should either be using 3.0 which has the advantage that is it ubiquitous on all Windows platforms currently in support so you don't really need to consider installing it at all. OR be using 6.0 since you need to include a distribution of MSXML it may as well be 6 since that is the latest and neither 4 nor 5 get any security patches.

like image 63
AnthonyWJones Avatar answered Oct 03 '22 04:10

AnthonyWJones