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

# GetNameX (XBOX Series 主機)

> 傳回先前提供給 ID3D12Object::SetName 的此物件名稱 (如果有的話)。

傳回先前提供給 ID3D12Object::SetName 的此物件名稱 (如果有的話)。

## 語法

```cpp theme={null}
HRESULT GetNameX(  
         LPWSTR pName,  
         UINT* pNameLength  
)  
```

### 參數

*pName*   \_Out\_writes\_opt\_(\*pNameLength)\
類型：LPWSTR

用來保存名稱的輸出字串緩衝區。

*pNameLength*   \_Inout\_opt\_\
類型：UINT\*

輸出字串緩衝區的長度 (以字元為單位)。

### 傳回值

類型：HRESULT

如果成功，則傳回 S\_OK；否則傳回錯誤碼。如需錯誤碼清單，請參閱 [Direct3D 12 傳回碼](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues)。

## 備註

使用零售版圖形驅動程式時，此 API 無法運作；它只適用於檢測版和驗證版驅動程式。

## 需求

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

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

## 另請參閱

[ID3D12Object](/zh-TW/reference/graphics/d3d12_xs/interfaces/ID3D12Object/id3d12object)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [D3D_NAME (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12_xs/enums/d3d_name.md)
- [GetShaderIdentifier (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getshaderidentifier_public.md)
- [GetShaderStackSize (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getshaderstacksize_public.md)
- [GetPipelineStackSize (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getpipelinestacksize_public.md)
