PBCallInfo structure
The PBCallInfo
structure is used to hold data and return type information for calls
between extensions and the PBVM. It has three public members:
IPB_Arguments* pArgs;
IPB_Value* returnValue;
pbclass returnClass;
The following code initializes a PBCallInfo structure using
the IPB_Session InitCallInfo method.
After allocating a PBCallInfo structure called ci,
the IPB_Session GetClass and GetMethodID methods
are used to get the class and method ID of the current method. Then,
these parameters are used to initialize the ci structure:
pbclass cls;
pbmethodID mid;
PBCallInfo* ci = new PBCallInfo;
cls = Session -> GetClass(myobj);
mid = Session -> GetMethodID(cls, "myfunc",
PBRT_FUNCTION, "II");
Session -> InitCallInfo(cls, mid, ci);
When you have finished using a PBCallInfo structure, you must
call FreeCallInfo to release the allocated memory:
Session -> FreeCallInfo(ci);
delete ci;
The IPB_Arguments and IPB_Value interfaces
have methods that enable you to pass values between the PBVM and
PowerBuilder extension modules using PBCallInfo to hold the data.