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

# PFServiceConfigGetTitleId

> 获取服务配置的 PlayFab titleId。

获取服务配置的 PlayFab titleId。

## 语法

```cpp theme={null}
HRESULT PFServiceConfigGetTitleId(  
    PFServiceConfigHandle handle,  
    size_t titleIdSize,  
    char* titleId,  
    size_t* titleIdUsed  
)  
```

### 参数

**`handle`**   PFServiceConfigHandle

ServiceConfig 句柄。

**`titleIdSize`**   size\_t

提供的缓冲区大小。所需的大小可通过 PFServiceConfigGetTitleIdSize 获取。

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

用于写入 titleId 的缓冲区。

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

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

### 返回值

类型：HRESULT

此 API 操作的结果代码。

## 要求

**头文件：** PFServiceConfig.h

## 另请参阅

[PFServiceConfig 成员](/services/playfab/api-references/c/pfserviceconfig/pfserviceconfig_members)


## Related topics

- [服务 C API 概览 - PFServiceConfig.h](/zh-CN/services/playfab/api-references/c/pfserviceconfig/pfserviceconfig_members.md)
- [SDK 生命周期](/zh-CN/services/playfab/sdks/c/lifecycle.md)
- [PFServiceConfigGetTitleIdSize](/zh-CN/services/playfab/api-references/c/pfserviceconfig/functions/pfserviceconfiggettitleidsize.md)
- [XGameGetXboxTitleId](/zh-CN/reference/system/xgame/functions/xgamegetxboxtitleid.md)
- [MicrosoftGame.config 元素 - TitleId](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-titleid.md)
