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.
The IPB_Arguments interface has two methods, GetAt and GetCount.
Returns a pointer to the IPB_Value interface representing an argument whose order in the list of arguments is indicated by a specified index.
GetAt ( pbint index )
Argument  | 
Description  | 
|---|---|
index  | 
A valid index into the PBCallInfo structure  | 
IPB_Value*.
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);
}
Obtains the number of arguments in an instance of PBCallInfo.
GetCount ( )
pbint.
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;
   }
   ...