I'm assuming that request is defined in the assembly that you are calling, so 
it's not .net that doesn't understand the object. 

Have you changed the signature of the assembly after you registered it? 
Unreg/rereg.  This includes reordering methods in the exposed interface. 

Other than that, the easiest solution is not to pass the object but call a 
method with simple types. 

Not much more I can think of at the mo.

Davy



-----Original Message-----
From: "Greg Keogh" <[email protected]>
Date: Sun, 28 Nov 2010 17:45:28 
To: <[email protected]>; 'ozDotNet'<[email protected]>
Subject: RE: [OT] VBScript return string runtime error

Does this mean you are sending back an object?
request.Comment = "Mock comment"
request.Body = "This is a mock body text"
If it does is the object returned visible and compliant? 

 

No, 'request' is a COM object argument that I fill and send in the
SendRequest method. The method returns a string. It's the string that I
can't get back due to the runtime error. I made a unit test that performs
exactly the same calls as the VBS file it works perfectly. Now I have made
dummy methods to see how they go in the VBS file. The results are consistent
but I don't understand them.

 

string = Function()

string = Function(string)

Function(COMobject)

String = Function(COMobject)

 

Only the last one gives the runtime error. I've tried different argument
types. The rule is that I can't combine a return value with a COM object
argument.

 

Greg


Reply via email to