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."); } }
public static extern UInt32 EthernetScanner_GetInfo(IntPtr pScanner, ref ScannerInformation scanInfo, UInt32 scanInfoSize, UInt32 timeout);