Add<type>Argument
Description
Adds an argument of a specific type in a variable argument
PowerBuilder call.
Syntax
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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 ) |
|
Argument |
Description |
|---|---|
|
ci |
The PBCallInfo to which the argument is to be |
|
value |
The value to be added to the arguments |
|
IsNull |
Indicates whether the argument is null. The default |
Return value
PBXRESULT. PBX_OK on success.
Examples
This code tests that adding an integer argument to a PBCallInfo
structure ci works correctly:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
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
This call is used in variable argument PowerBuilder calls, such as
datawindow.retrieve(arg). After the call, the value returned by
ci->pArgs->GetCount() increases by one.
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest