69,371
社区成员
发帖
与我相关
我的任务
分享
extern "C" __declspec(dllimport) BOOL FPSAPI CaptureImage(BYTE uwTimeoutS,BYTE* pRawImage);
/// <summary>
/// 捕获图象
/// </summary>
/// <param name="uwTimeoutS">超时时间</param>
/// <param name="pRawImage">存贮图象数据</param>
/// <returns>1成功,其他失败</returns>
[DllImport("fpsiml.dll", EntryPoint = "CaptureImage", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode)]
public static extern int CaptureImage(UInt16 uwTimeoutS, byte[] pRawImage);
byte[] pRawImage =new byte[9216];
IntPtr bytepointer = System.Runtime.InteropServices.Marshal.UnsafeAddrOfPinnedArrayElement(pRawImage, 0);