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, MTS, and COM+ components – PB Docs 90 – PowerBuilder Library

About building COM, MTS, and COM+ components – PB Docs 90

About building COM, MTS, and COM+ components

You can
develop a custom class user object containing business logic in PowerBuilder
and then package the object as a COM server or MTS or COM+ application.

On platforms that support COM+, such as Windows 2000
and Windows XP, you can build COM+ applications and deploy
them to COM+. On platforms that do not support COM+,
such as Windows NT, but that have the required Microsoft Transaction
Server (MTS) components installed, you can build COM servers and
deploy them to MTS.

The rest of this chapter uses the term COM components to refer
to components that support COM and COM+.

PowerBuilder COM applications 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 application directly to a local MTS or COM+ server
or create an MTS package or COM+ Microsoft Installer package
from the Project painter.

Once you have generated and deployed a PowerBuilder COM application, users
can call methods on the PowerBuilder 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 components:

  • Target
    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
    a COM+ or MTS package from one or more existing custom class
    user objects

When you create a new user object using a COM/MTS/COM+ Target
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 Target 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 Target 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 Target 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 in MTS”
.

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 Target 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.
    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/COM+ Component
    Project wizard or the Project painter.
    See “Building COM/MTS/COM+ components
    in the Project painter”
    .
  5. Open the project, modify the list of selected objects
    and their properties if necessary, and build the project.
  6. Deploy the server.
    See “Deploying a 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