Exemplo n.º 1
0
        public static byte[] ReadMemory(ImaqdxSessionHandle session, ulong offset, int count)
        {
            Debug.Assert(session != null, "The session parameter cannot be null.");
            Debug.Assert(!session.IsInvalid, "The session parameter must be a valid handle.");
            Debug.Assert(count > 0, "The count parameter must be greater than zero.");

            byte[] values = new byte[count];
            int    status = NiImaqdxDll.IMAQdxReadMemory(session, (uint)offset, values, (uint)count);

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