Instancing Property

Applies To   See Also

Specifies how a server in a project can be instantiated. Available at design time and run time.

Syntax

Object.Instancing[ = nExpression]

Settings

nExpression

Specifies how the server can be instantiated. The following table lists the values for nExpression with a description of each.

Settings FoxPro.h constant Description
1 SERVERINSTANCE_SINGLEUSE (Default) Allows you to create an instance of the class both inside Visual FoxPro and outside of Visual FoxPro using Automation.

Each request for an instance of the class by an automation client outside of the project causes a separate copy of the automation server to start.

2 SERVERINSTANCE_NOTCREATABLE Allows you to create instances of the class only inside Visual FoxPro.
3 SERVERINSTANCE_MULTIUSE Allows you to create an instance of the class both inside Visual FoxPro and outside of Visual FoxPro using Automation.

Each request for an instance of the class by an automation client outside of the project causes an already running copy of the automation server to be provided as the source for the new instance.