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_MESSAGE_CALLBACK

### Callback Definition

    1
    BOOL NET_MESSAGE_CALLBACK(LONG lCommand, LONG lUserID, char* pBuf, DWORD dwBufLen, void* pUser);

### Function Description

Data callback when alarm occurs.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lCommandin | LONG | Command handle, refer to `NET_SDK_DEVICE_MSG_TYPE`.
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
pBufin | char* | Buffer pointer, received using the corresponding data structure depending on the lCommand.
dwBufLenin | DWORD | Buffer length.
pUserin | void* | User-defined parameters are passed in when setting the callback function.

### Return Value

- Type：BOOL

- Remark：Meaningless

### Remarks

Depending on the lCommand, the corresponding data structure is as follows:

lCommand | pBuf structure | Remarks
--- | --- | ---
NET_SDK_ALARM | `NET_SDK_ALARMINFO`*(dwBufLen / sizeof(`NET_SDK_ALARMINFO`)) | -
NET_SDK_RECORD | `NET_SDK_RECORD_STATUS`*(dwBufLen / sizeof(`NET_SDK_RECORD_STATUS`)) | Currently only IPC is not supported
NET_SDK_IVM_RULE | `NET_SDK_IVM_RULE_STATUS`*(dwBufLen / sizeof(`NET_SDK_IVM_RULE_STATUS`)) | Currently only IPC is supported
NET_SDK_TRADEINFO | - | Not used yet
NET_SDK_IPCCFG | - | Not used yet

Error Code