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_GetFileByTimeEx

### Interface Definition

C++C#

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    POINTERHANDLE NET_SDK_GetFileByTimeEx(
        LONG lUserID,
        LONG lChannel,
        DD_TIME* lpStartTime,
        DD_TIME* lpStopTime,
        char* sSavedFileName,
        BOOL bCustomFormat,
        BOOL bUseCallBack = false,
        BACKUP_DATA_CALLBACK fBackupDataCallBack = NULL,
        void* pUser = NULL);

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    public static extern POINTERHANDLE NET_SDK_GetFileByTimeEx(
        Int32 lUserID,
        Int32 lChannel,
        ref DD_TIME lpStartTime,
        ref DD_TIME lpStopTime,
        String sSavedFileName,
        bool bCustomFormat,
        bool bUseCallBack,
        BACKUP_DATA_CALLBACK fBackupDataCallBack,
        IntPtr pUser);

### Function Description

Extended interface for downloading video files by time.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
lChannelin | LONG | Channel number, starting from 0. This parameter is invalid for IPC devices.
lpStartTimein | `DD_TIME`* | Start time pointer.
lpStopTimein | `DD_TIME`* | End time pointer.
sSavedFileNamein | char* | The path to the local file.
bCustomFormatin | BOOL | Whether to use private file format. TRUE means to use private file format.
bUseCallBackin | BOOL | Whether to use callback, TRUE means use it.
fBackupDataCallBackin | `BACKUP_DATA_CALLBACK` | Callback function.
pUserin | void* | User-defined parameters.

### Return Value

- Type：POINTERHANDLE

- Remark：-1 indicates failure, other values ​​are used as handles for the downloaded file.

### Remarks

None

Error Code