Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_CreateOnvifUser

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    BOOL NET_SDK_CreateOnvifUser(
        LONG lUserID,
        const char* userName,
        const char* password,
        NET_SDK_ONVIF_USER_LEVEL userLevel);

    1
    2
    3
    4
    5
    public static extern Boolean NET_SDK_CreateOnvifUser(
        Int32 lUserID,
        string userName,
        string password,
        NET_SDK_ONVIF_USER_LEVEL userLevel);

### Function Description

Create an ONVIF user (valid only for NVR).

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
userNamein | char* | ONVIF username.
passwordin | char* | ONVIF user password (clear text, internal MD5 encryption).
userLevelin | `NET_SDK_ONVIF_USER_LEVEL` | User level (video/operator/admin).

### Return Value

- Type：BOOL

- Remark：Returns TRUE if successful, FALSE if failed.

### Remarks

None

Error Code