Working with VBScript accessing COM Component


Recently I had to debug an .asp file using <%@ Language=VBScript %>

The issue is that it mentions Set p = Server.CreateObject(“a.b”),

Now what is a.b here ? and where is it present ? in the VD there is only this one asp file

server.createobject in vbscript


Turns out that a.b is a COM component that is being used here.

Next I want to find out the Registration Entries for this component from the Windows Registry :

Late Binding with a VBScript Client

Late-binding is so called because you don’t know if the methods exist until run-time. Late binding is based on the standard COM IDispatch interface, which has methods that return information about the methods and properties on an interface so that they can be discovered at run time. As an analogy, it’s somewhat the equivalent of using .NET reflection to find the structure and methods of .NET classes.

This is the VBScript:

dim obj,amsg
set obj = CreateObject (“CallPDW.Class1”)
amsg = obj.GetMyString
msgbox amsg

Just to state the obvious, there’s no checking that any of the methods such as GetMyString actually exist with that parameter structure when you write that script. This is discovered when you run the script using the IDispatchinterface on the object.


Calling COM Components from ASP Pages: