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_FormatDisk

### Interface Definition

C++C#

    1
    2
    3
    POINTERHANDLE NET_SDK_FormatDisk(
        LONG lUserID,
        LONG lDiskNumber);

    1
    2
    3
    public static extern POINTERHANDLE NET_SDK_FormatDisk(
        int lUserID,
        int lDiskNumber);

### Function Description

Remotely format the device hard disk (only supports 3.0DVR).

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
lDiskNumberin | LONG | Hard disk number, starting from 0. 0xff means it is valid for all hard disks (excluding read-only hard disks).

### Return Value

- Type：POINTERHANDLE

- Remark：-1 indicates failure, and other values ​​are used as the formatted hard disk handle.

### Remarks

If the network is disconnected during the formatting process, the formatting operation on the device will continue, but the client will not receive the status.

Error Code