About this chapter
This chapter contains information about the datatypes, enumerated types, and error return values used by the PowerBuilder Native Interface.
The following table maps PowerBuilder datatypes to predefined datatypes used in PBNI C++ modules.
PowerBuilder datatype |
Predefined datatype |
---|---|
Int |
pbint |
Uint |
pbuint |
Byte |
pbbyte |
Long |
pblong |
Longlong |
pblonglong |
Ulong |
pbulong |
Boolean |
pbboolean |
Real |
pbreal |
Double |
pbdouble |
Decimal |
pbdec |
Date |
pbdate |
Time |
pbtime |
DateTime |
pbdatetime |
Char |
pbchar |
Blob |
pbblob |
String |
pbstring |
Powerobject |
pbobject |
The types in the following table nable access to PowerBuilder data.
Datatype |
Description |
---|---|
pbgroup |
Used to access PowerBuilder group information. A group is a container of PowerBuilder classes. |
pbclass |
Used to access PowerBuilder class definition information. |
pbmethodID |
Used to access the method ID of a PowerBuilder global or member function. |
pbfieldID |
Used to access an instance variable. |
pbarray |
Used to access array information and data items. |
Enumerated types for PowerBuilder groups
The pbgroup_type enumerated types are used in IPB_Session FindGroup calls to identify the type of group required.
Value |
PowerBuilder object |
---|---|
pbgroup_application |
Application |
pbgroup_datawindow |
DataWindow definition |
pbgroup_function |
Global function |
pbgroup_menu |
Menu |
pbgroup_proxy |
Proxy definition for a remote object |
pbgroup_structure |
PowerBuilder structure type |
pbgroup_userobject |
PowerBuilder user object |
pbgroup_window |
Window |
pbgroup_unknown |
Unknown group |
Enumerated types for PowerBuilder values
The pbvalue_type enumerated types are used in methods such as the IPB_Value GetType method and the IPB_Session NewUnboundedSimpleArray method to identify the type of PowerBuilder data.
Value |
PowerBuilder datatype |
---|---|
pbvalue_notype |
Undetermined datatype. |
pbvalue_int |
Int |
pbvalue_uint |
Uint |
pbvalue_byte |
Byte |
pbvalue_long |
Long |
pbvalue_longlong |
Longlong |
pbvalue_ulong |
Ulong |
pbvalue_real |
Real |
pbvalue_double |
Double |
pbvalue_dec |
Decimal |
pbvalue_string |
String |
pbvalue_boolean |
Boolean |
pbvalue_any |
Any (changed to another datatype when set explicitly) |
pbvalue_blob |
Blob |
pbvalue_date |
Date |
pbvalue_time |
Time |
pbvalue_datetime |
DateTime |
pbvalue_char |
Char |
Enumerated types for PowerBuilder routines
The pbrt_type enumerated types are used in IPB_Session GetMethodID calls to identify the type of routine required.
The following table shows the PBXRESULT return values and error codes returned from PBNI methods.
Value of PBXResult |
Error code |
---|---|
PBX_OK |
0 |
PBX_SUCCESS |
0 |
PBX_FAIL |
-1 |
PBX_E_NO_REGISTER_FUNCTION |
-1 |
PBX_E_REGISTRATION_FAILED |
-2 |
PBX_E_BUILD_GROUP_FAILED |
-3 |
PBX_E_INVALID_ARGUMENT |
-4 |
PBX_E_INVOKE_METHOD_INACCESSABLE |
-5 |
PBX_E_INVOKE_WRONG_NUM_ARGS |
-6 |
PBX_E_INVOKE_REFARG_ERROR |
-7 |
PBX_E_INVOKE_METHOD_AMBIGUOUS |
-8 |
PBX_E_INVOKE_FAILURE |
-9 |
PBX_E_MISMATCHED_DATA_TYPE |
-10 |
PBX_E_OUTOF_MEMORY |
-11 |
PBX_E_GET_PBVM_FAILED |
-12 |
PBX_E_NO_SUCH_CLASS |
-13 |
PBX_E_CAN_NOT_LOCATE_APPLICATION |
-14 |
PBX_E_INVALID_METHOD_ID |
-15 |
PBX_E_READONLY_ARGS |
-16 |
PBX_E_ARRAY_INDEX_OUTOF_BOUNDS |
-100 |