Programming with Reflection
OLEServerName property
Syntax |
|
Data type |
Returns (first syntax line) or specifies (second syntax line) the Automation name that identifies the current instance of Reflection. This name can be used with the GetObject function to attach to a running copy of Reflection via OLE Automation. If there are multiple instances of Reflection running simultaneously, setting this property to a unique name for each instance gives you a way to guarantee which instance you'll attach to with GetObject.
For example, you could use the following statements from another application to attach to a running copy of Reflection:
Dim o As Object
Set o = GetObject("RIBM")
This is equivalent to the following:
Dim o As Object
Set o = GetObject(,"ReflectionIBM.Session")
In the first example, the name of the object (RIBM) can be changed by the user with the OLEServerName property, then used by GetObject to attach to a specific instance of Reflection. In the second example, the object class name (ReflectionIBM.Session) is fixed and cannot be changed; using GetObject will attach to an arbitrary instance of Reflection.
When the name of the Automation object is changed using the OLEServerName property, the new name is re-registered and the previous name is de-registered. Setting OLEServerName to an empty string de-registers that instance of Reflection, and you cannot use GetObject as in the first example above to attach to a running copy of Reflection; you must use the second form of GetObject above.
The default is "RIBM".
This string can be up to 32 characters long.