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

# GetLampInfo

> ILampArray::GetLampInfo

# ILampArray::GetLampInfo

返回给定索引处 Lamp 的 ILampInfo。

## 语法

```cpp theme={null}
HRESULT GetLampInfo(
    uint32_t lampIndex,
    ILampInfo** lampInfo)
```

### 参数

*lampIndex*\
类型：uint32\_t

ILampArray 中要获取 ILampInfo 的目标索引。

*lampInfo*  \_COM\_Outptr\_\
类型：ILampInfo\*\*

对应于 lampIndex 的 ILampInfo。如果 lampIndex 大于或等于 [ILampArray::GetLampCount](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getlampcount.md)，此值将为 null。

### 返回值

类型：HRESULT

函数结果。

## 备注

[ILampInfo](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/ilampinfo.md) 包含 ILampArray 中给定索引处 Lamp 的属性。

## 要求

**头文件：** LampArray.h

**库：** xgameplatform.lib

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

## 另请参阅

[光照 API 概览](https://docs.xbox.com/zh-CN/build/core-features/common/lighting/gc-lighting-toc.md)\
[ILampArray](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/ilamparray.md)\
[ILampInfo](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/ilampinfo.md)


## Related topics

- [GetIndex](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getindex.md)
- [ILampArray（接口内容）](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/ilamparray.md)
- [GetNearestSupportedColor](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getnearestsupportedcolor.md)
- [GetPosition](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getposition.md)
- [GetPurposes](https://docs.xbox.com/zh-CN/reference/lighting/lamparray/interfaces/ilampinfo/methods/ilampinfo_getpurposes.md)
