記錄 `hikclient.dll` C# 封裝過程中發現的參數類型錯誤及修正,避免踩坑。
// 原委托:byte[] pBuf 導致封送錯誤
public delegate void CapPicFun(int handle,
[MarshalAs(UnmanagedType.LPArray, SizeConst=152064)] byte[] pBuf, ...);
// 修正:IntPtr 對應非托管指針
public delegate void CapPicFun(int handle, IntPtr pBuf, int nSize,
int nWidth, int nHeight, int nStamp, int nType, int nReceived);
同步修正 `MP4_ClientSavePicFile` 簽名:`byte[]` → `IntPtr`。
// 原:long StockHandle
public static extern bool MP4_ClientStartCaptureFile(long handle, string fileName);
public static extern bool MP4_ClientStopCapture(long handle);
// 修正:int StockHandle(SDK 實際返回 32 位句柄)
public static extern bool MP4_ClientStartCaptureFile(int handle, string fileName);
public static extern bool MP4_ClientStopCapture(int handle);