Esempio n. 1
0
        public void DownloadFile(int userId, IRemoteFile remoteFile, string destinationPath)
        {
            if (remoteFile.Size > 0)
            {
                NET_DVR_PIC_PARAM temp = new NET_DVR_PIC_PARAM
                {
                    pDVRFileName  = remoteFile.Name,
                    pSavedFileBuf = Marshal.AllocHGlobal((int)remoteFile.Size),
                    dwBufLen      = (uint)remoteFile.Size
                };

                if (SdkHelper.InvokeSDK(() => NET_DVR_GetPicture_V50(userId, ref temp)))
                {
                    SdkHelper.InvokeSDK(() => NET_DVR_GetPicture(userId, temp.pDVRFileName, destinationPath));
                }

                Marshal.FreeHGlobal(temp.pSavedFileBuf);
            }
        }
Esempio n. 2
0
 private static extern bool NET_DVR_GetPicture_V50(int lUserID, ref NET_DVR_PIC_PARAM lpPicParam);