> ## 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-CN/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid.md) 方法使用指向 APP\_LOCAL\_DEVICE\_ID 常量的指针，以根据 DeviceID 检索设备。

[XInputGetDeviceId](https://docs.xbox.com/zh-CN/reference/input/xinputongameinput/functions/xinputgetdeviceid.md) 函数使用指向 APP\_LOCAL\_DEVICE\_ID 结构的指针，以返回给定用户索引处的设备的 APP\_LOCAL\_DEVICE\_ID。

[XUserDeviceAssociationChange](https://docs.xbox.com/zh-CN/reference/system/xuser/structs/xuserdeviceassociationchange.md) 结构包含一个 APP\_LOCAL\_DEVICE\_ID 结构成员。

[XUserFindForDevice](https://docs.xbox.com/zh-CN/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-CN/reference/system/xuser/xuser_members.md)

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

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

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


## Related topics

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