Example #1
0
        public static uint GetImageData(ImaqdxSessionHandle session, ImaqdxBufferNumberMode bufferNumberMode, ref byte[] data)
        {
            Debug.Assert(session != null, "The session parameter cannot be null.");
            Debug.Assert(!session.IsInvalid, "The session parameter must be a valid handle.");

            CreateImageDataArray(session, ref data);

            uint actualBufferNumber;
            int  status = NiImaqdxDll.IMAQdxGetImageData(session, data, (uint)data.Length, bufferNumberMode, (uint)0, out actualBufferNumber);

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