Help Center/ Meeting/ Client SDK Reference/ Windows SDK/ API Reference/ Basic Settings/ Setting the Path for Storing User Files
Updated on 2023-03-23 GMT+08:00

Setting the Path for Storing User Files

SetUserSavePath

API Description

This API is used to set the path for storing user files (including local recordings).

Precautions

  1. This API is optional. If not specified, the default path is used.
  2. 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

1
HWM_SDK_AGENT_API hwmsdk::HwmErrCode SetUserSavePath(HWMSavePathType type, const char* path);

Callback Function

1
virtual void OnSetUserSavePath(hwmsdk::HwmErrCode ret, const char* msg) {};

Parameter Description

Table 1 Parameters

Parameter

Mandatory

Type

Description

type

Yes

HWMSavePathType

enumerated path types

path

Yes

const char*

Absolute path

UTF-8 encoding is required.

Table 2 Description of HWMSavePathType

Enumerated Value

Description

HWM_SAVE_PATH_LOCAL_RECORD

Path for storing local recording files.

Return Values

Table 3 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
/**
* Setting the user save path
*/
void demoSetUserSavePathDlg::OnBnClickedSetUserSavePath()
{
    std::string path = "E:\\";
    int ret = hwmsdkagent::SetUserSavePath(hwmsdkagent::HWM_SAVE_PATH_LOCAL_RECORD, path.c_str());
    if (hwmsdk::HWM_COMMON_SUCCESS != ret)
    {
        AfxMessageBox(_T("Set save path failed"));
    }
}