Login | Register   
RSS Feed
Download our iPhone app
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



Application Security Testing: An Integral Part of DevOps

Reference a DLL From an ASP Page


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?


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:


Finally, remove the object from memory:

set objSomething = Nothing
DevX Pro
Comment and Contribute






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



We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date