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

Building the pbadd PowerBuilder extension – PB Docs 2018 – PowerBuilder Library

Building the pbadd PowerBuilder extension – PB Docs 2018

Building the pbadd PowerBuilder
extension

In this example, the C++ code is in three files:

  • The class declaration is in a header file, pbadd.h

  • The standard functions that every PowerBuilder extension must
    expose are in main.cpp

  • The implementation of the class is in pbadd.cpp.

To implement the pbadd extension:

  1. Create the pbadd.h header file.

    The pbadd.h header file declares the pbadd class. The file
    includes pbext.h, which must be included in all PowerBuilder
    extensions because it declares the ancestor classes for native
    classes and the standard functions that the extension must expose.
    Here is the code for pbadd.h:

  2. Create the main.cpp file, which includes pbadd.h and
    implements the standard functions, PBX_GetDescription and
    PBX_CreateNonvisualObject:

    • PBX_GetDescription is used to pass the descriptions of
      classes in the extension to PowerBuilder.

    • The PBX_CreateNonVisualObject method creates the object
      instance. The PowerScript CREATE statement maps to this PBNI
      method.

    The following is the code for main.cpp:

  3. Create the pbadd.cpp file, which includes pbadd.h and contains
    the implementation of the pbadd class and its single method,
    f_add.

To compile and link the PBX:

  • In your C++ development tool or on the command line, compile
    and link the PBX.

    Make sure the include directory in PowerBuilder 18.0SDKPBNI
    is in your include path. For this example, the generated DLL is
    called pbadd.pbx.


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