Calling PowerScript from an extension

PowerBuilder Native Interface

Calling PowerScript from an extension

Using GetMethodID

PbmethodID GetMethodID(pbclass cls, LPCTSTR
   methodName, PBRoutineType rt, LPCTSTR signature);
pbnisig3.gif
pbnisig1.gif
of_get_trans ( ref transaction atr_trans ) returns (none)

Using FindMatchingFunction

FindMatchingFunction(pbclass cls, LPCTSTR methodName, PBRoutineType rt, LPCTSTR readableSignature) 
mid = Session -> FindMatchingFunction(cls, "uf_test",
   PBRT_FUNCTION, "int, double");

Invoking PowerBuilder functions

PbmethodID GetMethodID(pbclass cls, LPCTSTR methodName,
    PBRoutineType rt, LPCTSTR signature, pbboolean publiconly)
PBXRESULT InitCallInfo(pbclass cls, pbmethodID mid, PBCallInfo *ci)
void FreeCallInfo(PBCallInfo *ci)
PBXRESULT Add<Type>Argument(PBCallInfo *ci, PBType v);
PBXRESULT InvokeClassFunction(pbclass cls, pbmethodID mid,
    PBCallInfo *ci)
PBXRESULT InvokeObjectFunction(pbobject obj, pbmethodID mid,
    PBCallInfo *ci)
PBXRESULT TriggerEvent(pbobject obj, pbmethodID mid, 
   PBCallInfo *ci)