G
Guest
Hello,
I have a dll that is created in visual studio 2003 with VB .NET.
In this dll I am returning an object that in turn contains a methods
that can return an array of ojbect.
When I build a test client in a VB, it all works fine. However, when I
try to use the same dll in an ASP VBScript app, I run into strange
problems. Test code reveals that the first object is returning an
array. But when I try to access userGrpAry(0), then it always returns
the following error:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/idmTestApp/Default.asp, line 32
The sample code is below. Any idea on how I can work base this? It
seems to be an iteroperability issue between .net and the non-.net
world.
Regards
Leslie
Dim auth, SSOSubject
Dim userGrpAry
Dim grpVal
Set auth = Server.CreateObject("idmVBApi.ÂComAuthenticate")
set grpVal = CreateObject("idmVBApi.GroupVaÂlue")
response.write " GrpVal type = " & typeName(grpVal) & "<br>"
set SSOSubject = auth.Authenticate("200", "tlogin1", "tlogin1")
response.write "Result Code = " & ssoSubject.resultCode & "<br>"
userGrpAry = ssoSubject.getUserGroups()
response.write "Group Ary is array = " & isArray(userGrpAry)
response.write "Group Ary upper bound = " & UBound(userGrpAry)
response.write "Group Ary lower bound = " & lbound(userGrpAry)
response.write " UserGrpAry type = " & TypeName(userGrpAry)
response.write " UserGrpAry Vartype = " & VarType(userGrpAry)
response.write " GroupValue Vartype = " & VarType(grpVal) & "<br>"
' line that fails.
response.write " UserGrp in Ary = " & VarType(userGrpAry(0))
Thanks in advance for your help.
Leslie
I have a dll that is created in visual studio 2003 with VB .NET.
In this dll I am returning an object that in turn contains a methods
that can return an array of ojbect.
When I build a test client in a VB, it all works fine. However, when I
try to use the same dll in an ASP VBScript app, I run into strange
problems. Test code reveals that the first object is returning an
array. But when I try to access userGrpAry(0), then it always returns
the following error:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/idmTestApp/Default.asp, line 32
The sample code is below. Any idea on how I can work base this? It
seems to be an iteroperability issue between .net and the non-.net
world.
Regards
Leslie
Dim auth, SSOSubject
Dim userGrpAry
Dim grpVal
Set auth = Server.CreateObject("idmVBApi.ÂComAuthenticate")
set grpVal = CreateObject("idmVBApi.GroupVaÂlue")
response.write " GrpVal type = " & typeName(grpVal) & "<br>"
set SSOSubject = auth.Authenticate("200", "tlogin1", "tlogin1")
response.write "Result Code = " & ssoSubject.resultCode & "<br>"
userGrpAry = ssoSubject.getUserGroups()
response.write "Group Ary is array = " & isArray(userGrpAry)
response.write "Group Ary upper bound = " & UBound(userGrpAry)
response.write "Group Ary lower bound = " & lbound(userGrpAry)
response.write " UserGrpAry type = " & TypeName(userGrpAry)
response.write " UserGrpAry Vartype = " & VarType(userGrpAry)
response.write " GroupValue Vartype = " & VarType(grpVal) & "<br>"
' line that fails.
response.write " UserGrp in Ary = " & VarType(userGrpAry(0))
Thanks in advance for your help.
Leslie