Hi Bogdan,
I'm afraid you shouldn't return and pass the Login class type in VB
Script Engine, you may refer to the following link,
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/mts/mtxpg04_34yv.htm
I think marshal it to variant type first. may work around this problem.
let me know if you still have problems on this issue, thanks!
Kind regards,
Ying-Shen Yu [MSFT]
Microsoft Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2001 Microsoft Corporation. All rights
reserved.
--------------------
| From: "Bogdan CIRLIG" <bcirlig@travtech.com>
| Subject: Re: ASP 3.0 + ServicedComponent COM method parameter type
mismatch
| Date: Thu, 21 Aug 2003 09:25:48 -0400
| Lines: 40
[quoted text clipped - 47 lines]
| HTH,
| Bogdan
Bogdan CIRLIG - 22 Aug 2003 14:23 GMT
Thanks for your reply.
I found an interesting solution: I created a generic function called
createObject(String typeName) which uses Activator to create the type sent
through typeName.
public Object createType(String typeName)
{
return Activator.CreateInstance(Type.GetType(typeName));
}
I assign the return of the function to my VBScript variable, let's say set
myVar = createObject("Login")
If I pass this variable back to my ServicedComponent everything works fine.
I don't get the idea? After all, it seems a type mismatch but it looks more
like a bug?!
What I can see is that if my Login type gets exported through registering
the ServicedComponent when I create an instance of it from VBScript it is
NOT the same type as the method signature as seen by VBScript.
VERY interesting to find out why?
HTH,
Bogdan
> Hi Bogdan,
> I'm afraid you shouldn't return and pass the Login class type in VB
[quoted text clipped - 71 lines]
> | HTH,
> | Bogdan