Programming Component Interfaces in C++

Building the Component Interface APIs for C++


If you plan to access your component interface from a Java external application, you must
create a component interface API. The APIs are in the form of C header files (*.h), which
needs to be included in the calling program.

To build the component interface bindings:


1. Open any component interface definition in PeopleSoft Application Designer.
Use any component interface definition, because you can build APIs for all of them,
regardless of which one is open.
2. Select Build, PeopleSoft APIs.
The Build PeopleSoft API Bindings dialog box appears.
3. Select the Build check box in the C Header Files group box.
For the target directory, enter the directory in which you want the C++ header file to be
created: typically \bin\client\winX86
4. Click OK to build the bindings that you selected.
The peoplesoft_peoplesoft._i.h file that constitutes the bindings is built in the location that
you specified. If the operation was successful, a Done message appears in the PeopleSoft
Application Designer Build window.


Setting Up the C++ Environment


When deploying component interfaces on a local client machine with C++ bindings, you must
have:
• The third party C++ application.
• The PeopleSoft application server and database.
• The Java Virtual Machine (JVM) supplied with Sun Microsystem’s JDK 1.3.1.
• Your compiler, configured for the C++ project.
Third Party Application
For applications written in C or C++, note the following:
• The function names generated by the Build APIs process can be quite long. You may
want to consider creating classes within your C++ code to mask this length throughout
your program.
• When you create your installation for your C or C++ program, make sure you include
the setup of the path to the psapiadapter.dll.