HidGameControllerProvider
HidGameControllerProvider
HidGameControllerProvider
HidGameControllerProvider
Class
Definition
Represents the underlying device for a HID (Human Interface Device) game controller.
public : sealed class HidGameControllerProvider : IGameControllerProvider, IHidGameControllerProviderpublic sealed class HidGameControllerProvider : IGameControllerProvider, IHidGameControllerProviderPublic NotInheritable Class HidGameControllerProvider Implements IGameControllerProvider, IHidGameControllerProvider// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
Remarks
This class provides functions for sending raw HID output reports, as well as reading and writing raw HID feature reports. These reports are in their original format—no parsing is done on them.
This class also exposes the HID page and usage of the TLC (top-level collection), so that you can interface correctly with each supported TLC.
Properties
FirmwareVersionInfo FirmwareVersionInfo FirmwareVersionInfo FirmwareVersionInfo
The firmware version of the controller.
public : GameControllerVersionInfo FirmwareVersionInfo { get; }public GameControllerVersionInfo FirmwareVersionInfo { get; }Public ReadOnly Property FirmwareVersionInfo As GameControllerVersionInfo// You can use this property in JavaScript.
- Value
- GameControllerVersionInfo GameControllerVersionInfo GameControllerVersionInfo GameControllerVersionInfo
The firmware version of the controller.
HardwareProductId HardwareProductId HardwareProductId HardwareProductId
The hardware product ID of the controller.
public : ushort HardwareProductId { get; }public ushort HardwareProductId { get; }Public ReadOnly Property HardwareProductId As ushort// You can use this property in JavaScript.
- Value
- ushort ushort ushort ushort
The hardware product ID of the controller.
HardwareVendorId HardwareVendorId HardwareVendorId HardwareVendorId
The hardware vendor ID of the controller.
public : ushort HardwareVendorId { get; }public ushort HardwareVendorId { get; }Public ReadOnly Property HardwareVendorId As ushort// You can use this property in JavaScript.
- Value
- ushort ushort ushort ushort
The hardware vendor ID of the controller.
HardwareVersionInfo HardwareVersionInfo HardwareVersionInfo HardwareVersionInfo
Contains information on the hardware version of the controller.
public : GameControllerVersionInfo HardwareVersionInfo { get; }public GameControllerVersionInfo HardwareVersionInfo { get; }Public ReadOnly Property HardwareVersionInfo As GameControllerVersionInfo// You can use this property in JavaScript.
- Value
- GameControllerVersionInfo GameControllerVersionInfo GameControllerVersionInfo GameControllerVersionInfo
Contains information on the hardware version of the controller.
IsConnected IsConnected IsConnected IsConnected
Boolean value indicating whether the controller is connected.
public : PlatForm::Boolean IsConnected { get; }public bool IsConnected { get; }Public ReadOnly Property IsConnected As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
Boolean value indicating whether the controller is connected.
UsageId UsageId UsageId UsageId
The usage ID of the top-level collection.
public : ushort UsageId { get; }public ushort UsageId { get; }Public ReadOnly Property UsageId As ushort// You can use this property in JavaScript.
- Value
- ushort ushort ushort ushort
The usage ID of the top-level collection.
UsagePage UsagePage UsagePage UsagePage
The usage page of the top-level collection.
public : ushort UsagePage { get; }public ushort UsagePage { get; }Public ReadOnly Property UsagePage As ushort// You can use this property in JavaScript.
- Value
- ushort ushort ushort ushort
The usage page of the top-level collection.
Remarks
The UsagePage is retrieved from the HID (Human Interface Device) report descriptor.
Methods
GetFeatureReport(Byte, Byte[]) GetFeatureReport(Byte, Byte[]) GetFeatureReport(Byte, Byte[]) GetFeatureReport(Byte, Byte[])
Gets the specified HID (Human Interface Device) feature report from the controller.
public : void GetFeatureReport(Byte reportId, Byte[] reportBuffer)public void GetFeatureReport(Byte reportId, Byte[] reportBuffer)Public Function GetFeatureReport(reportId As Byte, reportBuffer As Byte[]) As void// You can use this method in JavaScript.
- reportId
- Byte Byte Byte Byte
The ID of the report to get.
- reportBuffer
- Byte[] Byte[] Byte[] Byte[]
The buffer in which the report data is returned.
Remarks
When using this method for your own custom classes, make sure to pass in a valid report ID that is supported by your device; otherwise, the report buffer will be unchanged. Also make sure that your report buffer is the correct size for the type of report that you're requesting.
The report that you get from this method is the raw, unmodified version in its original format; no parsing is done on it.
SendFeatureReport(Byte, Byte[]) SendFeatureReport(Byte, Byte[]) SendFeatureReport(Byte, Byte[]) SendFeatureReport(Byte, Byte[])
Sends the specified HID (Human Interface Device) feature report to the device.
public : void SendFeatureReport(Byte reportId, Byte[] reportBuffer)public void SendFeatureReport(Byte reportId, Byte[] reportBuffer)Public Function SendFeatureReport(reportId As Byte, reportBuffer As Byte[]) As void// You can use this method in JavaScript.
- reportId
- Byte Byte Byte Byte
The ID of the report to send.
- reportBuffer
- Byte[] Byte[] Byte[] Byte[]
The buffer containing the report data to send.
Remarks
When using this method for your own custom classes, make sure to pass in a valid report ID that is supported by your device; otherwise, the device will ignore it. Also make sure that your report buffer is the correct size and has valid contents.
The report that you send from this method is the raw, unmodified version in its original format; no parsing is done on it.
SendOutputReport(Byte, Byte[]) SendOutputReport(Byte, Byte[]) SendOutputReport(Byte, Byte[]) SendOutputReport(Byte, Byte[])
Sends the specified HID (Human Interface Device) output report to the device.
public : void SendOutputReport(Byte reportId, Byte[] reportBuffer)public void SendOutputReport(Byte reportId, Byte[] reportBuffer)Public Function SendOutputReport(reportId As Byte, reportBuffer As Byte[]) As void// You can use this method in JavaScript.
- reportId
- Byte Byte Byte Byte
The ID of the report to send.
- reportBuffer
- Byte[] Byte[] Byte[] Byte[]
The buffer containing the report data to send.
Remarks
When using this method for your own custom classes, make sure to pass in a valid report ID that is supported by your device; otherwise, the device will ignore it. Also make sure that your report buffer is the correct size and has valid contents.
The report that you send from this function is the raw, unmodified version in its original format; no parsing is done on it.