SharedObjectRegister

Description

Registers a user object so that it can be shared.

Syntax

SharedObjectRegister ( classname , instancename )

Argument

Description

classname

The name of the user object that you want to share

instancename

A string whose value is the name you want to assign to the shared object instance

Returns

ErrorReturn. Returns one of the following values:

Usage

When you call the SharedObjectRegister function, PowerBuilder opens a separate runtime session for the shared object and creates the shared object. The name you specify for the object instance provides a way for you to access the object instance with the SharedObjectGet function.

You can use a shared object on a PowerBuilder client to simulate an asynchronous call to EAServer. For more information, see the description of the SharedObjectGet function.

Examples

Example 1

In this example, the user object uo_customers is registered so that it can be shared. The name assigned to the shared object instance is share1. After registering the object, the application uses the SharedObjectGet function to store an instance of the object in an object variable:

SharedObjectRegister("uo_customers", "share1")

SharedObjectGet("share1",shared_object)

See also