IPBX_UserObject interface:
Invoke method
Description
Calls methods in PowerBuilder native classes.
Syntax
Invoke(IPB_Session * session, pbobject obj, pbmethodID mid, PBCallInfo *ci)
Argument |
Description |
---|---|
session |
This IPB session |
obj |
The PowerBuilder extension object to be invoked |
mid |
The pbMethodID returned by GetMethodID |
ci |
The parameters and return value setting for the call |
Return Values
PBXRESULT.PBX_OK for success.
Examples
In this example, the method invoked depends on the value (0, 1, or 2) of the method ID returned from the GetMethodID method:
PBXRESULT PBNIExt::Invoke
(
IPB_Session *session,
pbobject obj,
pbmethodID mid,
PBCallInfo *ci
)
{
PBXRESULT result = PBX_OK;
switch (mid)
{
case mFuncA:
result = FuncA(session, obj, ci);
break;
case mFuncB:
result = FuncB(session, obj, ci);
break;
case mFuncC:
result = FuncC(session, obj, ci);
break;
default:
result = PBX_E_INVOKE_FAILURE;
break;
}
return PBX_OK;
}