Add<type>Argument

PowerBuilder Native Interface

IPB_Session interface:

Add<type>Argument method

Description

Syntax

AddArrayArgument ( PBCallInfo *ci, pbblob value, pbboolean IsNull ) 
AddBlobArgument ( PBCallInfo *ci, pbblob value, pbboolean IsNull ) 
AddBoolArgument ( PBCallInfo *ci, pbboolean value, pbboolean IsNull ) 
AddByteArgument ( PBCallInfo *ci, pbbyte value, pbboolean IsNull ) 
AddCharArgument ( PBCallInfo *ci, pbchar value, pbboolean IsNull ) 
AddDateArgument ( PBCallInfo *ci, pbdate value, pbboolean IsNull ) 
AddDateTimeArgument ( PBCallInfo *ci, pbdatetime value, pbboolean IsNull ) 
AddDecArgument ( PBCallInfo *ci, pbdec value, pbboolean IsNull ) 
AddDoubleArgument ( PBCallInfo *ci, pbdouble value, pbboolean IsNull ) 
AddIntArgument ( PBCallInfo *ci, pbint value, pbboolean IsNull ) 
AddLongArgument ( PBCallInfo *ci, pblong value, pbboolean IsNull ) 
AddLongLongArgument ( PBCallInfo *ci, pblonglong value, pbboolean IsNull ) 
AddObjectArgument ( PBCallInfo *ci, pbobject value, pbboolean IsNull ) 
AddPBStringArgument ( PBCallInfo *ci, pbstring value, pbboolean IsNull ) 
AddRealArgument ( PBCallInfo *ci, pbreal value, pbboolean IsNull ) 
AddStringArgument ( PBCallInfo *ci, LPCTSTR value, pbboolean IsNull ) 
AddTimeArgument ( PBCallInfo *ci, pbtime value, pbboolean IsNull ) 
AddUintArgument ( PBCallInfo *ci, pbuint value, pbboolean IsNull ) 
AddUlongArgument ( PBCallInfo *ci, pbulong value, pbboolean IsNull ) 

Return Values

Examples

long Cmy_pbni:: f_Retrieve(IPB_Session* session, pbint retrieve_args, pbobject dwobj)
{
   pbclass cls;
   pbmethodID mid;
   PBCallInfo* ci = new PBCallInfo;
   pblong ret_val;
   PBXRESULT ret;

   cls = session-> GetClass(dwobj);
   mid = session-> GetMethodID
      (cls, "retrieve", PBRT_FUNCTION, "LAV");
   if (mid == kUndefinedMethodID)
      return -1;

   session-> InitCallInfo(cls, mid, ci);

   ci-> pArgs-> GetAt(0)-> SetInt(retrieve_args);
   session-> AddIntArgument(ci, retrieve_args, false);

   ret = session->InvokeObjectFunction(dwobj, mid, ci);
   if (ret!= PBX_OK)
      ret_val= ret;
   else
      ret_val= ci-> returnValue-> GetLong();

   session-> FreeCallInfo(ci);
   delete ci;

   return ret_val;
}

Usage

See Also