dcsimg
Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: COM/DCOM/COM+
Expertise: Beginner
Oct 21, 1999

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Reference a DLL From an ASP Page

Question:

I wrote a DLL in Visual Basic and I want to use its functions in ASP. I created a server.CreateObject("projectname.classname") and tried to call some of the methods of the object, but received "Automation error Invalid syntax." How do I use the object's methods?

Answer:

Once you create the DLL in VB, you need to copy it to the Web server machine and then register it. Use the utility RegSvr32.EXE found in your Windows directory to register your DLL.

RegSvr32 will register a DLL.
RegSvr32 /U will unregister a DLL.

Once you do that, you can access it by using the code you have:

set objSomething = Server.CreateObject("projectname.classname")

Then call its method (say MethodCall) by using:

objSomething.Methodcall

Finally, remove the object from memory:

set objSomething = Nothing
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date