
error in loading DLL (strange problem)
I've found the cause. It was the dll which was not correctly registered in
the location referenced in the metadata tag. I used a project group and only
had the dll project in there... which of course didn't work. Now, I pulled
it out of the project group since it needn't be in there anyway and it all
worked.
Gary, thanks for your help
/ Morgan
Quote:
> I wasn't too clear about my problem. I never try to access the contents of
> the returned variant; only send it to a session variable. The error occurs
> directly when the variant is returned into an ASP-variable (actually as a
> return value from an ASP-function). This does not expose the udt contents
> and should work. It leads me to think that I have problems creating my udt
> object from ASP. Note that I have this in global.asa:
> <!-- METADATA TYPE="TypeLib" file="c:\mydll.dll" -->
> I can't find much information about this construct so I'm going to run a
> little more trial-and-sure to error.
> / Morgan
> > Based on my first research, i found that the User-defined data types are
> > not supported in the current version of Active Server Pages (ASP). Here
> is
> > the public article:
> > PRB: Returning a UDT from a VB COM Object Brings an Error (Q224422)
> > http://www.*-*-*.com/ ;en-us;Q224422
> > Then i also tried it with the following code,
> > VB DLL code:
> > Public Type TestUDT
> > strName As String
> > strDept As String
> > End Type
> > Public Function TestMethod() As Variant
> > Dim udtTestData As TestUDT
> > udtTestData.strDept = "TestDept"
> > udtTestData.strName = "TestName"
> > TestMethod = udtTestData
> > End Function
> > ASP code:
> > <%
> > Dim objTest, udtData
> > Set objTest = Server.CreateObject("VBUDTPrj.VBUDTObj")
> > udtData = objTest.TestMethod()
> > Response.Write( "Name = " & udtData.strName & "<BR>" )
> > Response.Write( "Dept = " & udtData.strDept & "<BR>" )
> > %>
> > When I run the ASP without debugging into the VB Dll, the following
error
> > occurred:
> > Microsoft VBScript runtime error '800a01a8'
> > Object required
> > While with VB DLL de{*filter*} enabled, the same error as you mentioned
> > occurred:
> > Microsoft VBScript runtime error '800a0030'
> > Error Loading DLL: TestMethod
> > As my suggestion, please follow the workaround mentioned in the article
> > above to workaround the problem.
> > Regards,
> > This posting is provided "AS IS", with no warranties, and confers no
> > rights. Enjoyed ASP.NET? http://www.*-*-*.com/