public static IEnumerable <DetectorInfo> GetInfos() { try { var errorCode = Acquisition_GbIF_GetDeviceCnt(out int deviceCount); CheckError(errorCode); if (deviceCount > 0) { var deviceParams = new GBIF_DEVICE_PARAM[deviceCount]; errorCode = Acquisition_GbIF_GetDeviceList(deviceParams, deviceCount); CheckError(errorCode); return(deviceParams.Select(deviceParam => deviceParam.ToInfo())); } } catch { } return(Enumerable.Empty <DetectorInfo>()); }
private extern static int Acquisition_GbIF_GetDevice(string address, int addressType, out GBIF_DEVICE_PARAM deviceParam);
public unsafe static extern uint Acquisition_GbIF_GetDevice(byte *ucAddress, int dwAddressType, ref GBIF_DEVICE_PARAM pDevice );
public static extern uint Acquisition_GbIF_GetDeviceParams(IntPtr hAcqDesc, ref GBIF_DEVICE_PARAM pDevice );
public unsafe static extern uint Acquisition_GbIF_GetDeviceList(ref GBIF_DEVICE_PARAM pGBIF_DEVICE_PARAM, int nDeviceCnt );