Esempio n. 1
0
        public ScannerInformation GetScannerInformation()
        {
            AssertValidHandle();

            ScannerInformation result     = new ScannerInformation();
            UInt32             resultCode = NativeMethods.EthernetScanner_GetInfo(_handle, ref result, (uint)Marshal.SizeOf(typeof(ScannerInformation)), DefaultTimeout);

            if (resultCode != 0)
            {
                _scannerInformation = result;
                return(result);
            }
            else
            {
                throw new ApplicationException("An error occured while attempting to retrieve sensor information.");
            }
        }
Esempio n. 2
0
 public static extern UInt32 EthernetScanner_GetInfo(IntPtr pScanner, ref ScannerInformation scanInfo, UInt32 scanInfoSize, UInt32 timeout);