> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IGameInputDevice::GetVendorId

> Gets the vendor ID of the input device.

Gets the vendor ID of the input device.

## Syntax

```cpp theme={null}
uint16_t GetVendorId();
```

### Parameters

This method has no parameters.

### Return value

Type: uint16\_t

The vendor ID that identifies the manufacturer of the input device, or 0 if the device doesn't report a vendor ID.

## Remarks

The vendor ID, together with the product ID returned by [IGameInputDevice::GetProductId](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getproductid.md), identifies a specific device model. For USB and Bluetooth devices, these are typically the same vendor and product IDs that the device reports to the operating system. Use [IGameInputDevice::GetRevisionNumber](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrevisionnumber.md) to distinguish between hardware revisions of the same product.

The vendor ID doesn't change for the lifetime of the device object.

The following example checks whether a device matches a specific vendor and product ID.

```cpp theme={null}
bool IsDeviceModel(
    IGameInputDevice* device,
    uint16_t vendorId,
    uint16_t productId) noexcept
{
    return device->GetVendorId() == vendorId &&
           device->GetProductId() == productId;
}
```

In GameInput v3 and earlier, this information was available from the `vendorId` member of the [GameInputDeviceInfo](https://docs.xbox.com/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) structure returned by [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md).

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputDevice](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[IGameInputDevice::GetProductId](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getproductid.md)\
[IGameInputDevice::GetRevisionNumber](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrevisionnumber.md)

## Version History

| Version | Changes |
| - | - |
| **v4** | Introduced. |


## Related topics

- [IGameInputDevice::GetProductId](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getproductid.md)
- [IGameInputDevice::GetRevisionNumber](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrevisionnumber.md)
- [IGameInputDevice::GetDeviceId](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md)
- [IGameInputDevice::GetDeviceRootId](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdevicerootid.md)
- [IGameInputDevice::GetContainerId](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getcontainerid.md)
