public UInt32 Pdo_DrawRectSet(UInt32 hPdoHandle, List <System.Drawing.Rectangle> rects) { TPDO_DRAW_RECT ptDrawRect = new TPDO_DRAW_RECT(); ptDrawRect.dwRectNum = (uint)rects.Count; ptDrawRect.atRectList = new TPDO_RECT[Common.PDO_DRAW_RECT_MAXNUM]; for (int i = 0; i < ptDrawRect.dwRectNum; i++) { ptDrawRect.atRectList[i] = new TPDO_RECT { dwHeight = (uint)rects[i].Height, dwWidth = (uint)rects[i].Width, dwX = (uint)rects[i].X, dwY = (uint)rects[i].Y }; } MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_DrawRectSet hPdoHandle:" + hPdoHandle); UInt32 retVal = IVXSDKProtocol.Pdo_DrawRectSet(hPdoHandle, ref ptDrawRect); //if (0 != retVal) //{ // // 调用失败,抛异常 // CheckError(); //} MyLog4Net.ILogExtension.DebugWithDebugView(MyLog4Net.Container.Instance.Log, "IVXSDKProtocol Pdo_DrawRectSet ret:" + retVal); return(retVal); }