> ## 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](/zh-TW/reference/input/gameinput/interfaces/igameinput/methods/igameinput_finddevicefromid) 方法會使用 APP\_LOCAL\_DEVICE\_ID 常數的指標，根據 DeviceID 擷取裝置。

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

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

[XUserFindForDevice](/zh-TW/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](/zh-TW/reference/system/xuser/xuser_members)

[XUserLocalId](/zh-TW/reference/system/xuser/structs/xuserlocalid)

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

[XInputGetDeviceId](/zh-TW/reference/input/xinputongameinput/functions/xinputgetdeviceid)


## Related topics

- [APP_LOCAL_DEVICE_ID](/reference/system/xuser/structs/app_local_device_id.md)
- [ILampArray::GetDeviceId method](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getdeviceid.md)
- [ILampArray::GetDeviceId](/ko/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getdeviceid.md)
- [Método ILampArray::GetDeviceId](/es/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getdeviceid.md)
