> ## 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::GetProductId

> 入力デバイスの製品 ID を取得します。

入力デバイスの製品 ID を取得します。

## 構文

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

### パラメーター

このメソッドにはパラメーターがありません。

### 戻り値

型: uint16\_t

入力デバイスをそのベンダーの製品として識別する製品 ID。デバイスが製品 ID を報告しない場合は 0。

## 解説

製品 ID はデバイス ベンダーによって割り当てられるため、製品 ID は [IGameInputDevice::GetVendorId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getvendorid.md) から返されるベンダー ID と組み合わせた場合にのみ意味を持ちます。

製品 ID は、デバイス オブジェクトの有効期間中は変化しません。

GameInput v3 以前では、この情報は [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md) から返される [GameInputDeviceInfo](https://docs.xbox.com/ja-jp/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) 構造体の `productId` メンバーから取得できました。

## 要件

**ヘッダー:** GameInput.h

**ライブラリ:** gameinput.lib

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体、XBOX Series 本体

## 関連項目

[GameInput の概要](https://docs.xbox.com/ja-jp/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputDevice](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[IGameInputDevice::GetVendorId](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getvendorid.md)\
[IGameInputDevice::GetRevisionNumber](https://docs.xbox.com/ja-jp/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getrevisionnumber.md)

## バージョン履歴

| バージョン | 変更内容 |
| - | - |
| **v4** | 導入されました。 |


## Related topics

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