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

# ILampArray::GetDeviceId

> ILampArray::GetDeviceId

# ILampArray::GetDeviceId

返回 ILampArray 的系统生成 ID。

## 语法

```cpp theme={null}
void GetDeviceId(
    APP_LOCAL_DEVICE_ID* deviceId)
```

### 参数

*deviceId*  \_Out\_
类型：APP\_LOCAL\_DEVICE\_ID\*

指向 APP\_LOCAL\_DEVICE\_ID 结构的指针，设备 ID 将被复制到该结构中。

### 返回值

类型：void

## 备注

*应用程序本地设备 ID* 是一个特殊的 32 字节值，可唯一标识设备，即使应用程序重启或系统重新启动后仍然保持一致。对于无线设备的断开与重连，以及只要重新插入同一 USB 端口的有线 USB 设备，此 ID 也保持稳定。

在初始版本中，此函数将填充一个全零值。

## 要求

**头文件：** LampArray.h

**库：** xgameplatform.lib

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

## 另请参阅

[光照 API 概览](/build/core-features/common/lighting/gc-lighting-toc)\
[ILampArray](/reference/lighting/lamparray/interfaces/ilamparray/ilamparray)


## Related topics

- [ILampArray::GetProductId](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getproductid.md)
- [ILampArray::GetVendorId](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getvendorid.md)
- [ILampArray::GetLampArrayKind](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlamparraykind.md)
- [ILampArray::GetLampInfo](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampinfo.md)
- [ILampArray::GetLampCount](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampcount.md)
