> ## 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::GetIndicesCountForPurposes 方法

> 傳回 LampArray 上符合指定 LampPurposes 旗標集合的 Lamp 索引數目，用於為 GetIndicesForPurposes 決定緩衝區大小。

# ILampArray::GetIndicesCountForPurposes

傳回支援指定 LampPurposes 集合的 Lamp 索引數目。

## 語法

```cpp theme={null}
uint32_t GetIndicesCountForPurposes(
    LampPurposes lampPurposes)
```

### 參數

*lampPurposes*\
類型：[LampPurposes](/zh-TW/reference/lighting/lamparray/enums/lamppurposes)

要查詢的所需用途集合。

### 傳回值

類型：uint32\_t

此 ILampArray 上支援 LampPurposes 中所有標記值的 Lamp 數目。

## 備註

在使用 [ILampArray::GetIndicesForPurposes](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes) 之前呼叫此方法，以判斷該函式將支援的最大緩衝區大小。

## 需求

**標頭：** LampArray.h

**程式庫：** xgameplatform.lib

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[照明 API 概觀](/zh-TW/build/core-features/common/lighting/gc-lighting-toc)\
[ILampArray::GetIndicesForPurposes](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes)\
[ILampArray](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/ilamparray)


## Related topics

- [ILampArray::GetIndicesCountForPurposes](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicescountforpurposes.md)
- [ILampArray::GetIndicesCountForPurposes method](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicescountforpurposes.md)
- [Método ILampArray::GetIndicesCountForPurposes](/es/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicescountforpurposes.md)
- [ILampArray::GetIndicesForPurposes](/zh-CN/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes.md)
- [ILampArray::GetIndicesForPurposes method](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getindicesforpurposes.md)
