Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Dll's not working in asp

Status
Not open for further replies.

GoblinGreen

Programmer
Mar 5, 2001
3
0
0
ZA
I need to develop several active x Dll's which will be called from some asp files. I find that I can create instances of the classes and set properties but I cannot call ANY methods. out of desperation I created the following DLL, TestD with the Class TestC This Class has one method :

Public Function TestM(ByVal WordsGoHere As Variant) As Variant
TestM = WordsGoHere & " PROCESSED"
End Function

Simple hey!
Right here is the calling asp code.

On error resume next
ListingID = Request.QueryString("ListingID")
Set LePrinter = Server.createObject("TestD.TestC")
response.write Listingid
item = LePrinter.TestM ( ListingID )
response.write item
Set LePrinter = Nothing
response.write err.description & " - " & err.source

This is the resultant output

262447Object required - Microsoft VBScript runtime error

What is going on here?
 
I would remove the 'on error resume next' statement to see at what line it really went wrong.

Did you register the DLL on the server? Did you unregister it before updating it? Did you use the correct threading mode when building the DLL? Are all the required VB runtime DLL's on the server?

The source code seems to be alright though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top