InvokeObjectFunction
Description
Invokes a class member method.
Syntax
|
1 |
InvokeObjectFunction(pbobject obj, pbmethodID mid, PBCallInfo *ci) |
|
Argument |
Description |
|---|---|
|
obj |
The pbobject containing the method |
|
mid |
The pbMethodID returned by |
|
ci |
A pointer to a preallocated PBCallInfo |
Return value
PBXRESULT. Returns PBX_OK for success, or one of the following for
failure:
PBX_E_INVALID_ARGUMENT
PBX_E_INVOKE_METHOD_INACCESSABLE
PBX_E_INVOKE_WRONG_NUM_ARGS
PBX_E_INVOKE_REFARG_ERROR
PBX_E_INVOKE_METHOD_AMBIGUOUS
PBX_E_INVOKE_FAILURE
PBX_E_INVOKE_FAILURE
Examples
This code invokes the DataWindow Update function and returns its
integer return value:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
pbclass cls; pbmethodID mid; PBCallInfo* ci = new PBCallInfo; pbint ret_val; cls = session->GetClass(dwobj); mid = session->GetMethodID (cls, "Update", PBRT_FUNCTION, "I"); session->InitCallInfo(cls, mid, ci); session->InvokeObjectFunction(dwobj, mid, ci); ret_val = ci.returnValue->GetInt(); session->FreeCallInfo(ci); delete ci; return ret_val; |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest