PowerBuilder 11.5 supports shared objects in .NET Web Forms and Windows Forms targets. You can use the same shared object PowerScript functions in .NET targets that you use in standard PowerBuilder targets. You can
Use the SharedObjectRegister function to register a nonvisual object, allowing it to be shared
Use the SharedObjectDirectory function to retrieve the list of objects that have been registered for sharing
Use the SharedObjectGet function to obtain a reference to a shared object instance
Make calls to functions in the shared object
Use the SharedObjectUnregister function to unregister a user object that was previously registered as a shared object
Use variables in the shared object
Each shared object has its own local copy of the shared variables.
Although you can use the PowerScript shared object functions in the .NET environment, you must take the following considerations into account before you deploy PowerBuilder .NET projects that use these functions:
Shared objects cannot support the SQLCA global transaction object
Each shared object must use its own transaction object instance. Typically you initialize and connect to the transaction object instance in the Constructor event of the shared object, and disconnect from the shared object in the Destructor event.
You cannot use array declarations in shared objects that you deploy to the .NET environment
Data from a posted call to a shared object might not be displayed before an explicit postback is issued
When execution of a main thread is complete, it refreshes the UI and does not wait for the worker thread in a call that you post to a shared object to finish. If the worker thread inserts rows of data into a DataWindow, the UI is likely to have already been refreshed by the main thread, so the new rows will not be visible until the next time that the UI is refreshed.