Пример #1
0
        public static void GetAttribute(ImaqdxSessionHandle session, string name, out string value)
        {
            Debug.Assert(session != null, "The session parameter cannot be null.");
            Debug.Assert(!session.IsInvalid, "The session parameter must be a valid handle.");
            Debug.Assert(name != null, "The name parameter cannot be null.");

            object objectValue;
            int    status = NiImaqdxDll.IMAQdxGetAttributeCW(session, name, ImaqdxAttributeType.String, out objectValue);

            ExceptionBuilder.CheckErrorAndThrow(status);
            value = (objectValue == null ? string.Empty : (string)objectValue);
        }