> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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\*\
**Out\_writes*(titleIdSize)*

将写入 titleId 字符串的缓冲区。

**`titleIdUsed`**   size\_t\*\
*optional output*

缓冲区中已使用的字节数，包括 null 终止符。

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 要求

**头文件：** PFEntity.h

## 另请参阅

[PFEntity 成员](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pfentity/pfentity_members.md)


## Related topics

- [实体句柄](https://docs.xbox.com/zh-CN/services/playfab/sdks/c/entity-handles.md)
- [PFEntityGetTitleIdSize](https://docs.xbox.com/zh-CN/services/playfab/api-references/c/pfentity/functions/pfentitygettitleidsize.md)
- [GET /titles/{titleId}/users/{xuid}/activities API](https://docs.xbox.com/zh-CN/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-GetActivity.md)
- [POST /titles/{titleId}/activities/query](https://docs.xbox.com/zh-CN/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-ExternalGetActivityBatch.md)
- [Get Entity Item Review](https://docs.xbox.com/api-reference/catalog/get-entity-item-review.md)
