About PBNI
PBNI is a standard programming interface that enables developers to
extend the functionality of PowerBuilder. Using PBNI, you can create
extensions to PowerBuilder — nonvisual, visual, and marshaler extensions
— and embed the PowerBuilder virtual machine (PBVM) into C++
applications. Through the Java Native Interface (JNI) and PBNI, Java
applications can also communicate with the PBVM.
Code samples
This documentation contains two complete but very simple examples
that illustrate some basic principles of using the PowerBuilder Native
Interface (PBNI): Nonvisual
extension example and Creating a PowerBuilder object to be
called from C++. For more real-world examples, see the PBNI
section of the PowerBuilder Code Samples website at https://community.appeon.com/index.php/codeexchange/powerbuilder.
The following diagram illustrates the two-way communication, with
both PowerBuilder extensions and external applications, that PBNI provides
for the PBVM. As the diagram shows, a PowerBuilder extension communicates
with the PBVM through the IPB_Session interface, and the PBVM communicates
with the extension through an interface derived from
IPBX_UserObject.
C++ and Java extensions communicate with the PBVM through the IPB_VM
and IPB_Session interfaces.
Figure: Interaction between the PBVM and external applications and
extensions
