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
RegSvr32 /U
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
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.























