Exemplo n.º 1
0
        public static uint Grab(ImaqdxSessionHandle session, VisionImage image, bool waitForNextBuffer)
        {
            Debug.Assert(session != null, "The session parameter cannot be null.");
            Debug.Assert(!session.IsInvalid, "The session parameter must be a valid handle.");
            Debug.Assert(image != null, "The image parameter cannot be null.");

            uint actualBufferNumber;
            int  status = NiImaqdxDll.IMAQdxGrab(session, image._image, Convert.ToUInt32(waitForNextBuffer), out actualBufferNumber);

            ExceptionBuilder.CheckErrorAndThrow(status);
            return(actualBufferNumber);
        }