Scenario 7: Joining a Meeting
Description
You can call this API to join a meeting using a meeting ID and password regardless of whether you have logged in to Huawei Cloud Meeting or not.
Service Process
When using the SDK to join a meeting, call the JoinConfById API, and implement the OnJoinConfByIdResult, OnConfState, and OnConfInfo functions.
- Call the API.
- Assemble the HwmJoinConfByIdInfo data structure.
- Call the JoinConfById API to join a meeting. The data in preceding steps is used as input parameters.
- Implement the callback function.
Implement the OnJoinConfByIdResult function.
- Implement the notification function.
Implement the OnConfState function.
- Implement the notification function.
Implement the OnConfInfo function.
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
// Join a meeting using the meeting ID. int demoJoinConfByIdDlg::clickJoinConfById() { // Enter the meeting ID and meeting password. You can specify your display name in the meeting regardless of whether you have logged in or not. hwmsdkagent::HwmJoinConfByIdInfo data; memset(&data, 0, sizeof(hwmsdkagent::HwmJoinConfByIdInfo)); strncpy_s(data.confId, GetMeetingID().c_str(), HWM_MAX_CONF_ID_LEN); strncpy_s(data.password, GetAccessCode().c_str(), HWM_MAX_PASSWORD_LEN); strncpy_s(data.name, GetParticipantName().c_str(), HWM_MAX_DISPLAY_NAME_LEN); int ret = hwmsdkagent::JoinConfById(&data); return ret; } |
1 2 3 4 5 6 7 8 9 10 11 |
/** * Callback of the API for joining a meeting using the meeting ID */ void demoCallbackProc::OnJoinConfByIdResult(hwmsdk::HwmErrCode ret, const char* msg) { CString codeStr; codeStr.Format(_T("%d"), ret); string msgStr = CTools::UTF82MultiByte(msg); CString tips = _T("OnJoinConfByIdResult code:") + codeStr + _T(", msg:") + CString(msgStr.c_str()); AfxMessageBox(tips); } |
The OnConfState and OnConfInfo event notification scenarios are the same as the meeting creation scenario. For details, see Scenario 6: Creating a Meeting.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot