Name
CreateObject —
Set
objMyObject
= Server.CreateObject(
strProgId
)
Synopsis
Instantiates an object on the server. Once instantiated, this object's properties and methods can be used just as you can use the properties and methods of the built-in objects that come with ASP. The DLLs from which these objects are instantiated must be installed and registered on the web server machine separately from your installation of IIS.
Parameters
-
objMyObject The name of a variable that will contain a reference to the object you are instantiating.
-
strProgId The programmatic ID for the class from which you would like to instantiate an object. The format for the
strProgIdparameter is:[LibraryName.]Component[.Version]
This value is found in the registry and represents how the component's DLL is registered there. Although it sometimes contains the DLL name, it often does not. For example, the DLL from which you instantiate the Ad Rotator object is adrot.dll. However, its ProgID is
MSWC.AdRotator.1, as defined by the default value of the following registry key:HKEY_CLASSES_ROOT\CLSID\{1621F7C0-60AC-11CF-9427-444553540000}\ProgIDAs you will note, this is the ProgID for the registered DLL and contains version information in addition to its registered name. Sometimes, however, you may have several different versions of the same DLL registered on your machine. In this case, you can use the default value of the
VersionIndependentProgIDregistry key to instantiate the most recent version of the DLL. In ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access