コード例 #1
0
ファイル: AP820Scanner.cs プロジェクト: dmcclean/automation
        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.");
            }
        }
コード例 #2
0
 public static extern UInt32 EthernetScanner_GetInfo(IntPtr pScanner, ref ScannerInformation scanInfo, UInt32 scanInfoSize, UInt32 timeout);