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

# SetHangCallbacksX (XBOX One 系列)

> 設定 GPU 停止回應時要叫用的回呼函式。

設定 GPU 停止回應時要叫用的回呼函式。

## 語法

```cpp theme={null}
void SetHangCallbacksX(  
         D3D12XBOX_HANGBEGINCALLBACK pBeginCallback,  
         D3D12XBOX_HANGPRINTCALLBACK pPrintCallback,  
         D3D12XBOX_HANGDUMPCALLBACK pDumpCallback  
)  
```

### 參數

*pBeginCallback*   \_In\_\
類型：D3D12XBOX\_HANGBEGINCALLBACK

在停止回應傾印開始時要叫用之回呼函式的指標。回呼的傳回值決定是否寫出停止回應傾印；1 表示應寫出傾印檔案，0 表示不應寫出傾印檔案。

*pPrintCallback*   \_In\_\
類型：D3D12XBOX\_HANGPRINTCALLBACK

在停止回應傾印中每列印一行時要叫用之回呼函式的指標。

*pDumpCallback*   \_In\_\
類型：D3D12XBOX\_HANGDUMPCALLBACK

在停止回應傾印結束時要叫用之回呼函式的指標。

### 傳回值

類型：void

### 備註

這些回呼可用來插入遊戲特定資訊，或在 QA 程序期間傾印輸出。

## 需求

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

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

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

## 另請參閱

[ID3D12Device](/zh-TW/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device)


## Related topics

- [XBOX Hang Investigation Tool (XHIT)](/zh-CN/tools/tools-console/xhit/index.md)
- [XErrorSetCallback](/zh-CN/reference/system/xerror/functions/xerrorsetcallback.md)
- [chat_manager::set_memory_callbacks](/zh-CN/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_set_memory_callbacks.md)
- [XMEMALLOC_ROUTINE callback](/zh-CN/reference/system/xmem/functions/xmemalloc_routine.md)
- [XMEMFREE_ROUTINE callback](/zh-CN/reference/system/xmem/functions/xmemfree_routine.md)
