> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.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](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid) 方法使用指向 APP\_LOCAL\_DEVICE\_ID 常量的指针，以根据 DeviceID 检索设备。

[XInputGetDeviceId](/reference/input/xinputongameinput/functions/xinputgetdeviceid) 函数使用指向 APP\_LOCAL\_DEVICE\_ID 结构的指针，以返回给定用户索引处的设备的 APP\_LOCAL\_DEVICE\_ID。

[XUserDeviceAssociationChange](/reference/system/xuser/structs/xuserdeviceassociationchange) 结构包含一个 APP\_LOCAL\_DEVICE\_ID 结构成员。

[XUserFindForDevice](/reference/system/xuser/functions/xuserfindfordevice) 函数使用指向 APP\_LOCAL\_DEVICE\_ID 结构的指针，以检索特定设备 ID 的用户 ID。

"null" APP\_LOCAL\_DEVICE\_ID 的值等于 **XUserNullDeviceId**。

## 要求

**头文件：** XUser.h

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XUser](/reference/system/xuser/xuser_members)

[XUserLocalId](/reference/system/xuser/structs/xuserlocalid)

[IGameInput::FindDeviceFromId](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid)

[XInputGetDeviceId](/reference/input/xinputongameinput/functions/xinputgetdeviceid)


## Related topics

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