cnfCloseResource

Closes a conference resource handle.

Prototype

DWORD cnfCloseResource ( CNFRESOURCEHD cnfresourcehd)

Argument

Description

cnfresourcehd

Handle returned by cnfOpenResource.


Return values

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.


Events

Event

Description

CNFEVN_CLOSE_RESOURCE_DONE

Function completed successfully and the resource handle was released.


Details

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.

See also

cnfGetResourceList, cnfOpenResource

Example

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 );