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

# PFEntityGetTitleId

> 取得與實體控制代碼相關聯之 PFServiceConfig 的 titleId。

取得與實體控制代碼相關聯之 PFServiceConfig 的 titleId。

## 語法

```cpp theme={null}
HRESULT PFEntityGetTitleId(  
    PFEntityHandle entityHandle,  
    size_t titleIdSize,  
    char* titleIdBuffer,  
    size_t* titleIdUsed  
)  
```

### 參數

**`entityHandle`**   PFEntityHandle

從驗證呼叫傳回的 PFEntityHandle。

**`titleIdSize`**   size\_t

所提供緩衝區的大小。所需大小可透過 PFEntityGetAPIEndpointSize 取得。

**`titleIdBuffer`**   char\*<br />**Out\_writes*(titleIdSize)*

titleId 字串將寫入的緩衝區。

**`titleIdUsed`**   size\_t\*<br />*optional output*

緩衝區中已使用的位元組數目，包括 null 結束字元。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。

## 需求

**標頭：** PFEntity.h

## 另請參閱

[PFEntity 成員](/zh-TW/services/playfab/api-references/c/pfentity/pfentity_members)


## Related topics

- [服務 C API 概觀 - PFEntity.h](/zh-TW/services/playfab/api-references/c/pfentity/pfentity_members.md)
- [實體控制代碼](/zh-TW/services/playfab/sdks/c/entity-handles.md)
- [PFEntityGetTitleIdSize](/zh-TW/services/playfab/api-references/c/pfentity/functions/pfentitygettitleidsize.md)
- [Get Entity Item Review](/api-reference/catalog/get-entity-item-review.md)
- [Get Title Players From Xbox Live IDs](/api-reference/account-management/get-title-players-from-xbox-live-ids.md)
