Closes a conference resource handle.
DWORD cnfCloseResource ( CNFRESOURCEHD cnfresourcehd)
|
Argument |
Description |
|
cnfresourcehd |
Handle returned by cnfOpenResource. |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_INVALID_HANDLE |
cnfresourcehd is not a valid conference resource handle. |
|
CNFERR_BOARD_TIMEOUT |
Board timed out while waiting for a response message. |
|
Event |
Description |
|
CNFEVN_CLOSE_RESOURCE_DONE |
Function completed successfully and the resource handle was released. |
cnfCloseResource closes the conference resource handle and destroys the cnfresourcehd. All existing conferences created using this cnfresourcehd are closed and destroyed. Wait for CNFEVN_CLOSE_RESOURCE_DONE before making any other calls to NaturalConference (important when using the Server mode of Natural Access).
Refer to Closing a conference for more information about closing a resource.
cnfGetResourceList, cnfOpenResource
extern CTAHD ctahd;
extern CTAQUEUEHD qhd;
extern CNFRESOURCEHD cnfresourcehd;
DWORD myCloseResource()
{
DWORD error;
CTA_EVENT evt;
char textbuf[80] = "";
error = cnfCloseResource(cnfresourcehd);
if (error != SUCCESS)
{
}
do
{
error = ctaWaitEvent( qhd, &evt, CTA_WAIT_FOREVER );
if(error != SUCCESS)
{
ctaGetText( ctahd, error, textbuf, sizeof( textbuf ));
printf( "\rError when calling ctaWaitEvent => %s\n", textbuf);
return(error);
}
} while ( evt.id != CNFEVN_CLOSE_RESOURCE_DONE );