> ## 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.

# APP_LOCAL_DEVICE_ID

> APP_LOCAL_DEVICE_ID

# APP\_LOCAL\_DEVICE\_ID

指定本機輸入裝置的根 ID。

## 語法

```cpp theme={null}
typedef struct APP_LOCAL_DEVICE_ID {  
    BYTE value[APP_LOCAL_DEVICE_ID_SIZE];  
} APP_LOCAL_DEVICE_ID  
```

### 成員

*value*\
類型：BYTE\[APP\_LOCAL\_DEVICE\_ID\_SIZE]

本機輸入裝置的根 ID。

## 備註

[IGameInput::FindDeviceFromId](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid.md) 方法會使用 APP\_LOCAL\_DEVICE\_ID 常數的指標，根據 DeviceID 擷取裝置。

[XInputGetDeviceId](https://docs.xbox.com/zh-TW/reference/input/xinputongameinput/functions/xinputgetdeviceid.md) 函式會使用 APP\_LOCAL\_DEVICE\_ID 結構的指標，傳回位於指定使用者索引之裝置的 APP\_LOCAL\_DEVICE\_ID。

[XUserDeviceAssociationChange](https://docs.xbox.com/zh-TW/reference/system/xuser/structs/xuserdeviceassociationchange.md) 結構包含一個 APP\_LOCAL\_DEVICE\_ID 結構成員。

[XUserFindForDevice](https://docs.xbox.com/zh-TW/reference/system/xuser/functions/xuserfindfordevice.md) 函式會使用 APP\_LOCAL\_DEVICE\_ID 結構的指標，擷取特定裝置 ID 的使用者 ID。

「null」APP\_LOCAL\_DEVICE\_ID 會等於 **XUserNullDeviceId** 的值。

## 需求

**標頭：** XUser.h

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[XUser](https://docs.xbox.com/zh-TW/reference/system/xuser/xuser_members.md)

[XUserLocalId](https://docs.xbox.com/zh-TW/reference/system/xuser/structs/xuserlocalid.md)

[IGameInput::FindDeviceFromId](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid.md)

[XInputGetDeviceId](https://docs.xbox.com/zh-TW/reference/input/xinputongameinput/functions/xinputgetdeviceid.md)


## Related topics

- [GetDeviceId](https://docs.xbox.com/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getdeviceid.md)
- [IGameInput::FindDeviceFromId](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid.md)
- [XUserFindForDevice](https://docs.xbox.com/zh-TW/reference/system/xuser/functions/xuserfindfordevice.md)
- [IGameInput::DisableAggregateDevice](https://docs.xbox.com/zh-TW/reference/input/gameinput/interfaces/igameinput/methods/igameinput_disableaggregatedevice.md)
- [XUserDeviceAssociationChange](https://docs.xbox.com/zh-TW/reference/system/xuser/structs/xuserdeviceassociationchange.md)
