IPB_Session interface:
InitCallInfo method
Description
Initializes the PBCallInfo structure.
Syntax
|
1 |
InitCallInfo(pbclass <span>cls</span>, pbmethodID <span>mid</span>, PBCallInfo *<span>ci</span>) |
|
Argument |
Description |
|---|---|
|
cls |
The pbclass containing |
|
mid |
The pbMethodID returned |
|
ci |
A pointer to a preallocated PBCallInfo structure |
Return Values
PBXRESULT. Returns PBX_OK on success, and PBX_E_INVALID_ARGUMENT
on failure.
Examples
This example shows the implementation of a TriggerEvent function
in a visual class. It takes an event name as an argument, obtains
the class and method ID needed to initialize the PBCallInfo structure,
triggers the event, and frees the PBCallInfo structure:
|
1 |
void CVisualExt::TriggerEvent(LPCTSTR eventName)<br>{<br>   pbclass clz = d_session->GetClass(d_pbobj);<br>   pbmethodID mid = d_session->GetMethodID(clz,<br>      eventName, PBRT_EVENT, "I");<br> <br>   PBCallInfo ci;<br>   d_session-><span>InitCallInfo</span>(clz, mid, &ci);<br>   d_session->TriggerEvent(d_pbobj, mid, &ci);<br>   d_session->FreeCallInfo(&ci);<br>} |
Usage
On return, this method allocates enough space for the arguments,
and then initializes the arguments and return value. You must set
appropriate values in the PBCallInfo structure.
Note that the structure itself must have been allocated before the
call.