Setting the Sharing Permission
SetShareScreenPermission
API Description
This API is used to set the sharing permission.
Precautions
This API is an asynchronous API. The return value only indicates whether the API is successfully called. The actual service processing result is returned in the corresponding callback function.
Method Definition
HWM_SDK_AGENT_API hwmsdk::HwmErrCode SetShareScreenPermission(bool isAllowed);
Callback Function
1
|
virtual void OnSetShareScreenPermissionResult(hwmsdk::HwmErrCode ret, const char* reason) {}; |
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
isAllowed |
Yes |
bool |
Whether sharing is allowed. |
Return Values
Type |
Description |
---|---|
HwmErrCode |
If 0 is returned, the operation is successful. If other values are returned, the operation fails. For details about values returned upon failures, see Common Error Codes. |
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 |
/** * Sets the sharing permission. */ int demoSetShareScreenPermissionDlg::ClickSetShareScreenPermission() { bool isOpen = true; int ret = hwmsdkagent::SetShareScreenPermission(isOpen); if (hwmsdk::HWM_COMMON_SUCCESS != ret) { AfxMessageBox(_T("SetShareScreenPermission error")); } } |
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