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

# EnumerateMetaCommandParameters (XBOX Series 主机)

> 查询有关指定元命令参数的反射元数据。

查询有关指定元命令参数的反射元数据。

## 语法

```cpp theme={null}
HRESULT EnumerateMetaCommandParameters(
    const GUID & CommandId,
    D3D12_META_COMMAND_PARAMETER_STAGE Stage,
    UINT  pTotalStructureSizeInBytes,
    UINT  pParameterCount,
    D3D12_META_COMMAND_PARAMETER_DESC  pParameterDescs
)
```

### 参数

*CommandId \[in]*\
类型：const GUID &

对元命令的全局唯一标识符 (GUID) 的引用，希望在 <i>pParameterDescs</i> 中返回其参数。

*Stage \[in]*\
类型：D3D12\_META\_COMMAND\_PARAMETER\_STAGE

一个 [D3D12\_META\_COMMAND\_PARAMETER\_STAGE](/reference/graphics/d3d12/enums/d3d12_meta_command_parameter_stage_public)，指定希望包含在查询中的参数的阶段。

*pTotalStructureSizeInBytes \[out, optional]*\
类型：UINT \*

一个可选指针，指向 [UINT](https://learn.microsoft.com/en-us/windows/desktop/WinProg/windows-data-types)，其中包含在创建/初始化/执行元命令时传递的、包含参数值的结构的大小（视情况而定）。

*pParameterCount \[in, out]*\
类型：UINT \*

指向 [UINT](https://learn.microsoft.com/en-us/windows/desktop/WinProg/windows-data-types) 的指针，其中包含要查询的参数数量。此字段决定 <i>pParameterDescs</i> 数组的大小，除非 <i>pParameterDescs</i> 为 **nullptr**。

*pParameterDescs \[out, optional]*\
类型：D3D12\_META\_COMMAND\_PARAMETER\_DESC \*

一个可选指针，指向 [D3D12\_META\_COMMAND\_PARAMETER\_DESC](/reference/graphics/d3d12/structs/d3d12_meta_command_parameter_desc_public) 数组，其中包含参数的描述。传递 **nullptr** 可在 <i>pParameterCount</i> 中返回参数数量。

### 返回值

类型：HRESULT

如果此方法成功，则返回 **S\_OK**。否则，返回 **HRESULT** 错误代码。

## 要求

**头文件：** d3d12\_xs.h\
**库：** d3d12\_xs.lib\
**支持的平台**：XBOX Series 主机

## 另请参阅

[ID3D12Device5](/reference/graphics/d3d12/interfaces/id3d12device5/id3d12device5_public)


## Related topics

- [EnumerateMetaCommands (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_enumeratemetacommands_public.md)
- [InitializeMetaCommand (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_initializemetacommand_public.md)
- [CreateMetaCommand (XBOX Series 主机)](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_createmetacommand_public.md)
- [D3D12_META_COMMAND_PARAMETER_FLAGS](/zh-CN/reference/graphics/d3d12/enums/d3d12_meta_command_parameter_flags_public.md)
- [D3D12_META_COMMAND_PARAMETER_STAGE](/zh-CN/reference/graphics/d3d12/enums/d3d12_meta_command_parameter_stage_public.md)
