Programming with Reflection

image\rwnprg32.gif OLEServerName property

 

Syntax

object.OLEServerName
object.OLEServerName = Value

Works with

image\r124.gif

Data type

String

 

Description

Returns (first syntax line) or specifies (second syntax line) the name that Reflection registers with OLE to identify the 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 to attach to a running copy of Reflection 1:

Dim o As Object

Set o = GetObject("R1WIN")

This is equivalent to the following:

Dim o As Object

Set o = GetObject(,"Reflection1.Session")

In the first example, the name of the OLE object (R1WIN) 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" (Reflection1.Session) is fixed and cannot be changed; using GetObject will attach to an arbitrary instance of Reflection.

When the name of the OLE object is changed using the OLEServerName property, the new name is re-registered with OLE, and the previous name is de-registered. Setting OLEServerName to an empty string unregisters 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.

Values

The default value is "R1WIN" in Reflection for HP, "R2WIN" in Reflection for UNIX and OpenVMS, and "R4WIN" in Reflection for ReGIS Graphics.

The string can be up to 31 characters long.

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this property