Description
The IPB_Arguments and IPB_Value interfaces are used to pass values between the PowerBuilder VM and PowerBuilder extension modules. Each argument is represented by a pointer to the IPB_Value interface.
Methods
The IPB_Arguments interface has two methods, GetAt and GetCount.
Description
Returns a pointer to the IPB_Value interface representing an argument whose order in the list of arguments is indicated by a specified index.
Syntax
GetAt ( pbint index )
Return value
IPB_Value*
Examples
In the following code fragment, GetAt obtains the first value in the PBCallInfo structure. The value has been passed in from the calling function.
PBCallInfo ci; LPCSTR myPBNIObj = NULL; IPB_Value* pArg0 = ci->pArgs->GetAt(0); if (!pArg0->IsNull()) { pbstring t = pArg0->GetString(); if (t != NULL) myPBNIObj = session->GetString(t); }
See also
Description
Obtains the number of arguments in an instance of PBCallInfo.
Syntax
GetCount ( )
Return value
pbint.
Examples
This example uses GetCount in a FOR loop used to process different argument types:
int i; for (i=0; i < ci-> pArgs -> GetCount();i++) { pbuint ArgsType; if( ci -> pArgs -> GetAt(i) -> IsArray()) pArguments[i].array_val = ci -> pArgs -> GetAt(i) -> GetArray(); continue; } if( ci -> pArgs -> GetAt(i) -> IsObject()) { if (ci -> pArgs -> GetAt(i) -> IsNull()) pArguments[i].obj_val=0; else pArguments[i].obj_val = ci -> pArgs -> GetAt(i) -> GetObject(); continue; } ...
See also