IPB_Session interface:
GetNativeInterface method
Description
Obtains a pointer to the interface of a native class.
Syntax
GetNativeInterface(pbobject obj)
Argument |
Description |
---|---|
obj |
A valid object handle |
Return Values
IPBX_UserObject.
Examples
This example invokes the function f_retrieve in the native class Cmy_pbni to retrieve a DataWindow object:
long f_retrieve(IPB_Session* session, pbint iarg,
pbobject dwObj, pbobject extObj)
{
Imy_pbni* pImy_pbni = NULL;
pblong lRet;
if (session -> IsNativeObject(extObj) )
{
pImy_pbni = (Imy_pbni*) session ->
GetNativeInterface(extObj);
lRet = pImy_pbni-> f_Retrieve(session,
iarg, dwObj);
}
return lRet;
}
Usage
Use this method in conjunction with IsNativeObject to obtain a direct reference to the IPBX_UserObject associated with a native class in the same PowerBuilder extension. The class and its methods can then be accessed directly.