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.
Use with .NET targets
You can use the built-in Web services client extension (pbwsclient150.pbx)
in applications that you plan to deploy to .NET as a PowerBuilder
.NET Windows Forms application. You cannot use
any other PBNI extensions in a .NET target.
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 CodeXchange Web site
.
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 1-1: Interaction between the PBVM and external applications
and extensions
