CreateInstance

Creates an instance of a remote object running on a middle-tier server.

To create a remote object instance

Use

From a PowerBuilder client

Syntax 1 For creating an object instance on a remote server

From within an EAServer or COM+ component

Syntax 2 For creating a component instance on the current server


Syntax 1 For creating an object instance on a remote server

Description

Creates an instance of a component running on EAServer. This function can be used to instantiate a remote object from a PowerBuilder client. In addition, it can be used within a component running on EAServer to instantiate another component running on a different server.

Applies to

Connection objects

Syntax

connection.CreateInstance (objectvariable {, classname } )

Returns

Long. Returns 0 if it succeeds or a negative value if an error occurs.


Syntax 2 For creating a component instance on the current server

Description

Creates an instance of a component running on the current EAServer or COM+ server. This function is called from within a component instance running on EAServer or COM+.

Applies to

TransactionServer objects

Syntax

transactionserver.CreateInstance (objectvariable {, classname } )

Returns

Long. Returns 0 if it succeeds or a negative value if an error occurs.