/// <summary>Constructor.</summary> /// <param name="type">Indicates the type of information to configure or obtain; must not be <see cref="DeviceInfoType.None"/>.</param> /// <param name="size">The size, in bytes, of the description (including the header, which is 20 bytes).</param> /// <param name="adapterId">The id of the adapter the device information refers to.</param> /// <param name="id">The identifier of the source or target to get or set information for.</param> /// <exception cref="ArgumentException"/> internal DeviceInformation( DeviceInfoType type, int size, Luid adapterId, int id ) { if( type == DeviceInfoType.None ) throw new ArgumentException( "Invalid DisplayConfig device info type.", "type" ); infoType = type; structSize = size; this.adapterId = adapterId; this.id = id; }
internal DeviceDescription(DeviceInfoType type, int size, DisplayDeviceId displayDeviceId) { if (type == DeviceInfoType.Undefined) { throw new ArgumentException("Invalid DisplayConfig device info type.", "type"); } infoType = type; structSize = size; id = displayDeviceId; }
public static DataSet QuerySubscriptionByESN_V2(String ESN) { wsdsService.wsMessageHeader = getHeader(); SecurityHelper.prepareSoapContext(wsdsService.RequestSoapContext); WholesaleQuerySubscriptionV2Type qsRequest = new WholesaleQuerySubscriptionV2Type(); DeviceInfoType deviceInfoType = new DeviceInfoType(); deviceInfoType.serialNumber = ESN; deviceInfoType.serialType = DeviceSerialNumberTypeCodeType.E; deviceInfoType.serialTypeSpecified = true; qsRequest.Item = deviceInfoType; DataSet ds = new DataSet(); try { // wsdsService.query WholesaleQuerySubscriptionV2ResponseType qsReply = wsdsService.WholesaleQuerySubscriptionV2(qsRequest); DataTable dtFeatures = new DataTable(); DataTable dtHistory = new DataTable(); DataTable dtPricePlan = new DataTable(); if (qsReply.detailedServiceList != null) { dtFeatures = Converter.ConvertToDataTable(qsReply.detailedServiceList); } if (qsReply.mdnList != null) { dtHistory = Converter.ConvertToDataTable(qsReply.mdnList); } if (qsReply.pricePlanList != null) { dtPricePlan = Converter.ConvertToDataTable(qsReply.pricePlanList); } ds.Tables.Add(dtHistory); ds.Tables.Add(dtPricePlan); ds.Tables.Add(dtFeatures); return(ds); } catch { throw; } }
public static byte[] GetRawInputDeviceInfo(IntPtr deviceHandle, DeviceInfoType uiCommand) { uint bufferSize = 0; uint wroteLength = GetRawInputDeviceInfo(deviceHandle, uiCommand, null, ref bufferSize); if (bufferSize <= 0 || wroteLength < 0) { throw new NativeException("GetRawInputDeviceInfo", Marshal.GetLastWin32Error()); } byte[] buffer = new byte[bufferSize]; wroteLength = GetRawInputDeviceInfo(deviceHandle, uiCommand, buffer, ref bufferSize); if (wroteLength != bufferSize) { throw new NativeException("GetRawInputDeviceInfo", Marshal.GetLastWin32Error()); } return(buffer); }
public static extern bool GetDeviceInfo(DeviceInfoType deviceInfoType, out int pvParam);
public static extern uint GetRawInputDeviceInfo(IntPtr hDevice, DeviceInfoType uiCommand, [In, Out] IntPtr pData, ref int pcbSize);
private static extern uint GetRawInputDeviceInfo(IntPtr hDevice, DeviceInfoType uiCommand, byte[] pData, ref uint pcbSize);
internal TargetDescription(DeviceInfoType type, int size, DisplayDeviceId displayDeviceId) : base(type, size, displayDeviceId) { }
public static WholesaleQuerySubscriptionV2ResponseType QueryWholesaleSubscriptionV2(DeviceInfoType deviceInfoType) { try { wsdsService.wsMessageHeader = getHeader(); SecurityHelper.prepareSoapContext(wsdsService.RequestSoapContext); WholesaleQuerySubscriptionV2Type qrsRequest = new WholesaleQuerySubscriptionV2Type(); qrsRequest.Item = deviceInfoType; WholesaleQuerySubscriptionV2ResponseType qrsReply = wsdsService.WholesaleQuerySubscriptionV2(qrsRequest); return(qrsReply); } catch { throw; } }
/// <summary>Constructor.</summary> /// <param name="type">Indicates the type of information to configure or obtain; must not be <see cref="DeviceInfoType.None"/>.</param> /// <param name="size">The size, in bytes, of the description (including the header, which is 20 bytes).</param> /// <param name="adapterId">The adapter the device information refers to.</param> /// <param name="id">The identifier of the source or target to get or set information for.</param> /// <exception cref="ArgumentException"/> internal TargetInformation( DeviceInfoType type, int size, Luid adapterId, int id ) : base( type, size, adapterId, id ) { }