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

# ID3D12CommandQueue::BeginEvent

> 不适合直接调用。使用 PIX 事件运行时将事件插入到命令队列中。(ID3D12CommandQueue.BeginEvent)

不适合直接调用。使用
[PIX 事件运行时](https://devblogs.microsoft.com/pix/winpixeventruntime/)将事件插入到命令队列中。

## 语法

```cpp theme={null}
void BeginEvent(
    UINT Metadata,
    const void  pData,
    UINT Size
)
```

### 参数

*Metadata*\
类型：UINT

内部使用。

*pData \[in, optional]*\
类型：const void \*

内部使用。

*Size*\
类型：UINT

内部使用。

### 返回值

类型：void

无。

## 备注

这是由 PIX 事件运行时内部使用的支持方法。不适合直接调用。

要在 D3D12 命令队列中的当前位置标记检测区域的开始，请使用 **PIXBeginEvent** 函数或 **PIXScopedEvent** 宏。这些由 [WinPixEventRuntime](https://devblogs.microsoft.com/pix/winpixeventruntime/) NuGet 包提供。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

[ID3D12CommandQueue](/reference/graphics/d3d12_xs/interfaces/ID3D12CommandQueue/id3d12commandqueue_xs)


## Related topics

- [NDA 主题目录 - Microsoft Learn 在线链接](/zh-CN/nda/nda-topic-directory.md)
- [ID3D12CommandQueue::Signal](/zh-CN/reference/graphics/d3d12/interfaces/id3d12commandqueue/methods/id3d12commandqueue_signal_public.md)
- [ID3D12CommandQueue::GetDesc](/zh-CN/reference/graphics/d3d12/interfaces/id3d12commandqueue/methods/id3d12commandqueue_getdesc_public.md)
- [D3D12_COMMAND_QUEUE_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_command_queue_desc_public.md)
- [CreateCommandQueue](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createcommandqueue_public.md)
