Updated on 2023-03-23 GMT+08:00

Scenario 5: Canceling a Meeting

Description

After a meeting is scheduled, you can call the API of canceling a meeting to cancel the meeting.

Service Process

To cancel a meeting, call the CancelConf API and implement the OnCancelConfResult and OnConfList functions.

  1. Call the API.

    Call the CancelConf API.

  2. Implement the callback function.

    Implement the OnCancelConfResult function.

  3. Implement the notification function.

    Implement the OnConfList function.

Sample Code

1
2
3
4
5
6
7
8
/**
* API for canceling a meeting
*/
int demoConfListDlg::OnBnCancelConf(hwmsdk::HwmErrCode ret, const char* msg)
{
    string confId = CTools::UNICODE2UTF(CString("989156631"));
    return hwmsdkagent::CancelConf(confId);
}

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/**
* Callback of the API for canceling the meeting
*/
void demoCallbackProc::OnCancelConfResult(hwmsdk::HwmErrCode ret, const char* msg)
{
    CString codeStr;
    codeStr.Format(_T("%d"), ret);
    string msgStr = CTools::UTF82MultiByte(msg);
    CString tips = _T("OnCancelConfResult code:") + codeStr + _T(", msg:") + CString(msgStr.c_str());
    AfxMessageBox(tips);
}

The OnConfList event notification scenario is the same as the meeting scheduling scenario. For details, see Sample Code.