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 |
   // PBCallInfo contains arguments and return value<br>   PBCallInfo ci; <br> <br>   // To call the class member function f_mult, <br>   // pass its signature as the last argument<br>   // to GetMethodID <br>   pbmethodID mid = session->GetMethodID(cls, "f_mult",<br>      PBRT_FUNCTION, "III");<br> <br>   // Initialize call info structure based on method ID<br>   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 |
   pbmethodID mid = session->FindMatchingFunction(cls,<br>      "f_mult", PBRT_FUNCTION, "int, int"); |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest