Partager via


Instancing Property

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

Object.Instancing[ = nExpression]

Property Values

  • 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
    0 SERVERINSTANCE_NOTCREATABLE Makes it possible for you to create instances of the class only inside Visual FoxPro.
    1 SERVERINSTANCE_SINGLEUSE (Default) Makes it possible for 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_MULTIUSE Makes it possible for 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.

See Also

GETOBJECT( ) Function | ServerClass Property | ServerClassLibrary Property

Applies To: Server Object