Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

About building COM and MTS components – PB Docs 70 – PowerBuilder Library

About building COM and MTS components – PB Docs 70

About building COM and MTS components

You can develop a custom class user object containing business
logic in PowerBuilder and then package the object as a COM object.
A PowerBuilder COM server can include one or more PowerBuilder custom
class user objects. You code the user objects in the User Object
painter and then build the server in the Project painter. You can
also deploy the COM server directly to a local MTS server or create
an MTS package from the Project painter.

Once you’ve generated and deployed a PowerBuilder COM
server, users can call methods on the PowerBuilder COM objects it
contains from COM-enabled client applications built with tools such
as PowerBuilder, Visual Basic, and C++ compilers.

About using the wizards

PowerBuilder provides several wizards to facilitate the development
and deployment of COM and MTS components:

  • Start wizard Creates a new application, a new custom class user object, and
    a new project
  • Object wizard Creates a new custom class user object in an existing application
    and creates a new project
  • Project wizard Creates a project you use to build a COM server and optionally
    an MTS package from one or more existing custom class user objects

When you create a new user object using a COM/MTS
Start or Object wizard:

  • The object has two
    new events: Activate and Deactivate.
  • The object has COM/MTS validation support
    enabled.
  • If you checked the box on the last page of the wizard,
    the wizard adds items to a To-Do List to remind you to complete
    all phases of development.

When to use the wizards

New objects If you plan to build a server containing a single new custom class
user object, use the Start or Object wizard to take advantage of
these features.

If you plan to build a server containing multiple new custom
class user objects, using the Start or Object wizards will give
you a separate project for each object, so you will need to add
all the objects to one of the projects and discard the other projects.
Alternatively, you can create new custom class user objects without
using the Start or Object wizards and then create the project later
using the Project wizard or the Project painter.

You can enable COM/MTS validation and add the Activate
and Deactivate events as user-defined events in the User Object
painter. For more information, see “COM/MTS validation” and “Providing support for object
lifetime control”
.

Existing objects If you have one or more custom class user objects that you want
to deploy as COM servers, make sure that they meet the requirements described
in “Defining the component interface” and
the subsequent sections. As for new user objects, you can enable
COM/MTS validation and add the Activate and Deactivate
events as user-defined events in the User Object painter. When you
are ready to build the server, you can use the Project wizard to
set up the project.

About the development process

To build and deploy a PowerBuilder COM server from one or more
custom class user objects, you need to complete the following steps:

  1. Create a new custom
    class user object or open an existing user object.
    If you use a Start or Object wizard, you also create a project
    object that you use to build and deploy the new object.
  2. Code the user object in the User Object painter.
    For more information, see “Defining the component interface”.
  3. Optionally, create and code additional user objects
    in the same application.
  4. If you did not use a wizard to create the user object(s),
    create a project using the COM/MTS Component Project wizard
    or the Project painter.
    For more information, see “Building COM/MTS
    components in the Project painter”
    .
  5. Open the project, if necessary modify the list of
    selected objects and their properties, and build the project.
  6. Deploy the server.
    For more information, see “Deploying the PowerBuilder COM
    server”
    .

Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x