Log in to the device (supports asynchronous login).
LONG NET_DVR_Login_V40( NET_DVR_USER_LOGIN_INFO pLoginInfo, NET_DVR_DEVICEINFO_V40 lpDeviceInfo );
[IN] Login parameters, including device address, user name, password, and so on. See details in the structure NET_DVR_USER_LOGIN_INFO.
[OUT] Device information. See details in the structure NET_DVR_DEVICEINFO_V40.
For asynchronous login, the callback function (fLoginResultCallBack) configured in the structure (NET_DVR_USER_LOGIN_INFO) returns the asynchronous login status, user ID and device information.
For synchronous login, this API returns -1 for logging failed, and returns other values for the returned user IDs. The user ID is unique, and it helps to realize the further device operations.
If -1 is returned, you can call NET_DVR_GetLastError to get the error code.
When bUseAsynLogin in pLoginInfo is 0, it indicates that login is in synchronous mode; when bUseAsynLogin in pLoginInfo is 1, it indicates that login is in asynchronous mode.
Up to 2048 users are allowed to log in to HCNetSDK at same time, and the values of returned UserID are ranging from 0 to 2047.