NewProxyObject

PowerBuilder Native Interface

IPB_Session interface:

NewProxyObject method

Description

Syntax

NewProxyObject(pbclass cls)

Return Values

Examples

pbproxyObject proxy = session->NewProxyObject(cls);
if (proxy == NULL)
{
   ci->returnValue->SetLong(kFailToCreateProxy);
   return PBX_OK;
}

// Create MyMarshaler
MyMarshaler* marshaler = new MyMarshaler(env,
   proxy, obj);

// Associate MyMarshaler with the proxy
session->SetMarshaler(proxy, marshaler);

ci->pArgs->GetAt(0)->SetObject(proxy);

ci->returnValue->SetLong(kSuccessful);

return PBX_OK;

See Also