[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] VB .NET InvalidCastException on Demo Client



Bradley Jonas wrote:
Hi!

I've built the Activex bridge and tested it without a problem in VB6.

Did the callback work with VB6? I've never found out how to do it, it would be nice if you can guide me how to do it.

I am trying to work with it in .NET and have copied the code exactly
as included with the XMLBlaster download (same as what is on the site
as well).
I get the following error:
An unhandled exception of type 'System.InvalidCastException' occurred
in mscorlib.dll

This works perfectly on my WinXP (with different service packs) test machine.

At which line is your exception thrown?
Can you lookup the ActiveX control in VC7?

Marcel


Additional information: QueryInterface for interface XmlScriptAccess.XmlScriptAccessDispatch failed.

I'm using the simple client for now, but I get the same error with
HelloWorld3 - my code is as follows:

    Sub Main()
        Dim request, response As String
        Dim xmlBlaster As XmlScriptAccess.XmlScriptAccessClass

        xmlBlaster = New XmlScriptAccess.XmlScriptAccessClass

        ' Configure using the SOCKET protocol
        Dim argArr(1) As String
        argArr(0) = "-protocol"
        argArr(1) = "SOCKET"

        xmlBlaster.initArgs(argArr)

        ' Connect to the server
        response = xmlBlaster.sendRequest("<xmlBlaster><connect/></xmlBlaster>")

        ' Query the free memory
        request = "<xmlBlaster><get><key
oid='__cmd:?freeMem'/></get></xmlBlaster>"
        response = xmlBlaster.sendRequest(request)
        Console.WriteLine("Got response:" & response)

        ' Leave the server
        response =
xmlBlaster.sendRequest("<xmlBlaster><disconnect/></xmlBlaster>")
    End Sub

Any help would be greatly appreciated!

Thanks!
B




--
http://www.xmlBlaster.org