[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[xmlblaster] VB .NET InvalidCastException on Demo Client
Hi!
I've built the Activex bridge and tested it without a problem in VB6.
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
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