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

# PFEntityGetEntityKey

> エンティティの PFEntityKey を取得します。

エンティティの PFEntityKey を取得します。

## 構文

```cpp theme={null}
HRESULT PFEntityGetEntityKey(  
    PFEntityHandle entityHandle,  
    size_t bufferSize,  
    void* buffer,  
    const PFEntityKey** entityKey,  
    size_t* bufferUsed  
)  
```

### パラメーター

**`entityHandle`**   PFEntityHandle

認証呼び出しから返された PFEntityHandle。

**`bufferSize`**   size\_t

PFEntityKey 用のバッファーのサイズ。必要なサイズは PFEntityGetEntityKeySize から取得できます。

**`buffer`**   void\*<br />\**Out\_writes\_bytes\_to*(bufferSize,*bufferUsed)*

PFEntityKey とそのフィールドに使用するバイト バッファー。

**`entityKey`**   [PFEntityKey\*\*](/services/playfab/api-references/c/pftypes/structs/pfentitykey-c)<br />*library-allocated output*

TBD

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

指定されたバッファーのうち、使用されたバイト数。

### 戻り値

型: HRESULT

この API 操作の結果コード。

## 解説

entityKey は buffer 内のポインターであり、個別に解放する必要はありません。

## 要件

**ヘッダー:** PFEntity.h

## 関連項目

[PFEntity メンバー](/services/playfab/api-references/c/pfentity/pfentity_members)


## Related topics

- [PFEntityIsTitlePlayer](/ja-jp/services/playfab/api-references/c/pfentity/functions/pfentityistitleplayer.md)
- [クイックスタート iOS](/ja-jp/services/playfab/sdks/c/quickstart-ios.md)
- [クイックスタート Linux](/ja-jp/services/playfab/sdks/c/quickstart-linux.md)
- [クイックスタート macOS](/ja-jp/services/playfab/sdks/c/quickstart-macos.md)
- [クイックスタート Android](/ja-jp/services/playfab/sdks/c/quickstart-android.md)
