6.1.2.8.1.4 CreateObject

Function Declaration

 Function CreateObject(Class As String, Optional ServerName 
 As String) 

Parameter

Description

Class

A String data value, containing the application name and class of the object to create.

ServerName

A String data value, containing the name of the network server where the object will be created. If ServerName is an empty string (""), the local machine is used.

 

Runtime Semantics.

§ Creates and returns an object reference to an externally provided and possibly remote object.

§ The class argument uses the Function Declaration AppName.ObjectType and has these parts:

Parameter

Description

AppName

The name of the application providing the object. The form and interpretation of an AppName is implementation defined.

ObjectType

The name of the type or class of object to create. The form and interpretation of an ObjectType name is implementation defined.

§ The data value returned by CreateObject is an object reference and can be used in any context where an object reference is expected.

§ If remote objects are supported it is via an implementation defined mechanism.

§ The format and interpretation of the ServerName argument is implementation defined but the intent is to identify a specific remote computer that that is responsible for providing a reference to a remote object.

§ An implementation can provide implementation defined mechanisms for designating single instance classes in which case only one instance of such a class is created, no matter how many times CreateObject is call requesting an instance of such a class.