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

# PIXGpuBeginCapture (XBOX One 系列)

> 開始 PIX GPU 擷取程序。

開始 PIX GPU 擷取程序。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT PIXGpuBeginCapture(  
         UINT Flags,  
         LPCWSTR lpOutputFileName  
)  
```

<a id="parametersSection" />

### 參數

*Flags*   \_In\_\
類型：UINT

用於控制此 PIX GPU 擷取的旗標，為 [D3D12XBOX\_PIX\_CAPTURE\_FLAGS](/zh-TW/reference/graphics/d3d12_x/enums/d3d12xbox_pix_capture_flags) 列舉常數的位元 OR 組合。

*lpOutputFileName*   \_In\_z\_\
類型：LPCWSTR

用來儲存資料的檔案名稱。

<a id="retvalSection" />

### 傳回值

類型：HRESULT

其中一個 [Direct3D 12 傳回碼](https://msdn.microsoft.com/library/windows/desktop/dn706075\(v=vs.85\).aspx)。

<a id="remarksSection" />

## 備註

此函式會開始 PIX GPU 擷取，持續擷取多個畫面，直到呼叫 [PIXGpuEndCapture](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12commandqueue/methods/id3d12commandqueue_pixgpuendcapture) 方法為止。此函式擷取的資料會以 .xpix 檔案的形式儲存在主機上，但只有在呼叫 `PIXGpuEndCapture` 方法之後才會儲存。您必須先將檔案複製到開發電腦，才能進行分析。如需 PIX GPU 擷取的詳細資訊，請參閱 [PIX GPU 擷取](https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/tools-console/xbox-tools-and-apis/pix/gpu/pix-gpu-capture)。

<a id="requirementsSection" />

## 需求

**標頭：** d3d12\_x.h

**程式庫：** d3d12\_x.lib

**支援的平台：** XBOX One 系列

<a id="seealsoSection" />

## 另請參閱

[PIXGpuCaptureNextFrame](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12commandqueue/methods/id3d12commandqueue_pixgpucapturenextframe)\
[ID3D12CommandQueue](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12commandqueue/id3d12commandqueue)\
[d3d12\_x](/zh-TW/reference/graphics/d3d12_x/d3d12_x_members)


## Related topics

- [PIXBeginCapture](/zh-TW/reference/tools/pix3/functions/pixbegincapture.md)
- [BeginQuery](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_beginquery_public.md)
- [XAsyncBegin](/zh-TW/reference/system/xasyncprovider/functions/xasyncbegin.md)
- [PIXBeginEvent 函式](/zh-TW/reference/tools/pix3/functions/pixbeginevent.md)
- [PIXBeginEvent 參考](/zh-TW/reference/tools/pix3/functions/pixbeginevent_3.md)
