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_Login

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    6
    LONG NET_SDK_Login(
        char* sDVRIP,
        WORD wDVRPort,
        char* sUserName,
        char* sPassword,
        LPNET_SDK_DEVICEINFO lpDeviceInfo);

    1
    2
    3
    4
    5
    6
    public static extern Int32 NET_SDK_Login(
        String sDVRIP,
        UInt16 wDVRPort,
        String sUserName,
        String sPassword,
        ref NET_SDK_DEVICEINFO lpDeviceInfo);

### Function Description

User registers the device.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
sDVRIPin | char* | Device IP address.
wDVRPortin | WORD | Device port number.
sUserNamein | char* | The user name for logging in.
sPasswordin | char* | User password.
lpDeviceInfoout | `LPNET_SDK_DEVICEINFO` | Device information `NET_SDK_DEVICEINFO`.

### Return Value

- Type：LONG

- Remark：-1 indicates failure, and other values ​​indicate the returned user ID value. This user ID is unique, and all subsequent operations on the device must be performed using this ID.

### Remarks

The device allows 32 registered user names and a maximum of 128 users to be registered at the same time.

Error Code