Initialize the PBCallInfo structure
Next, get the method ID for the function you want to call and
initialize a PBCallInfo structure. You pass the signature obtained in
Getting the signature of a
function to the GetMethodID function:
|
1 2 3 4 5 6 7 8 9 10 11 |
// PBCallInfo contains arguments and return value PBCallInfo ci; // To call the class member function f_mult, // pass its signature as the last argument // to GetMethodID pbmethodID mid = session->GetMethodID(cls, "f_mult", PBRT_FUNCTION, "III"); // Initialize call info structure based on method ID session->InitCallInfo(cls, mid, &ci); |
You could use FindMatchingFunction instead of GetMethodID to get
the method ID. The call would look like this, because f_mult takes two
integer arguments:
|
1 2 |
pbmethodID mid = session->FindMatchingFunction(cls, "f_mult", PBRT_FUNCTION, "int, int"); |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest