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

# AddBlobToGpuHangDumpX (XBOX Series 主機)

> 將記憶體 Blob 和中繼資料新增至停止回應傾印 (.hix) 檔案。只有在 GPU 停止回應時，才可從 D3D12XBOX_HANGBEGINCALLBACK 函式呼叫此函式。

將記憶體 Blob 和中繼資料新增至停止回應傾印 (.hix) 檔案。只有在 GPU 停止回應時，才可從 [D3D12XBOX\_HANGBEGINCALLBACK](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12device/methods/id3d12device_sethangcallbacksx) 函式呼叫此函式。

## 語法

```cpp theme={null}
HRESULT AddBlobToGpuHangDumpX(
  D3D12_GPU_VIRTUAL_ADDRESS Address,
  UINT SizeBytes,
  UINT64 Metadata
)
```

### 參數

*Address*\
類型：D3D12\_GPU\_VIRTUAL\_ADDRESS \_In\_

要新增 Blob 的 GPU 虛擬位址。

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

要新增之 Blob 的大小 (以位元組為單位)。

*Metadata*\
類型：UINT64 \_In\_

要與 Blob 建立關聯的使用者定義中繼資料。

### 傳回值

類型：HRESULT

如果成功，則傳回 S\_OK；否則傳回錯誤碼。如需錯誤碼清單，請參閱 [Direct3D 12 傳回碼](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues)。使用驗證驅動程式時，也會顯示描述性錯誤訊息。

## 備註

遊戲可以從 [D3D12XBOX\_HANGBEGINCALLBACK](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12device/methods/id3d12device_sethangcallbacksx) 函式多次呼叫此 API，將多個 Blob 新增至停止回應傾印。為每個 Blob 傳遞唯一的中繼資料，有助於在離線停止回應分析期間輕鬆識別它們。遊戲可以在呼叫此 API 之後回收 Blob 記憶體。Blob 加上中繼資料的總大小上限為 2 MB。

## 需求

**標頭：** d3d12\_xs.h\
**程式庫：** d3d12\_xs.lib\
**支援的平台：** XBOX Series 主機

## 另請參閱

[d3d12\_xs 成員](/zh-TW/reference/graphics/d3d12_xs/d3d12_xs_members)\
[ID3D12Device8](/zh-TW/reference/graphics/d3d12_xs/interfaces/ID3D12Device8/id3d12device8)\
[XBOX 停止回應調查 (HIX)](https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/tools-console/xbox-tools-and-apis/hix/hix)


## Related topics

- [XBOX Hang Investigation Tool (XHIT)](/tools/tools-console/xhit/index.md)
- [Hang Investigation for XBOX (HIX) tool](/tools/tools-console/hix/index.md)
- [xbWatson](/tools/tools-console/xbWatson/xbwatson.md)
- [Hang Investigation for XBOX (HIX) 工具](/zh-CN/tools/tools-console/hix/index.md)
- [Hang Investigation for XBOX (HIX) 도구](/ko/tools/tools-console/hix/index.md)
