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

> Obtém o PFEntityKey de uma entidade.

Obtém o PFEntityKey de uma entidade.

## Sintaxe

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

### Parâmetros

**`entityHandle`**   PFEntityHandle

PFEntityHandle retornado de uma chamada de autenticação.

**`bufferSize`**   size\_t

O tamanho do buffer para o PFEntityKey. O tamanho necessário pode ser obtido de PFEntityGetEntityKeySize.

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

Buffer de bytes usado para o PFEntityKey e seus campos.

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

TBD

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

O número de bytes usados no buffer fornecido.

### Valor de retorno

Tipo: HRESULT

Código de resultado desta operação de API.

## Comentários

entityKey é um ponteiro dentro do buffer e não precisa ser liberado separadamente.

## Requisitos

**Cabeçalho:** PFEntity.h

## Confira também

[Membros de PFEntity](/pt-BR/services/playfab/api-references/c/pfentity/pfentity_members)


## Related topics

- [PFEntityIsTitlePlayer](/pt-BR/services/playfab/api-references/c/pfentity/functions/pfentityistitleplayer.md)
- [Início rápido Android](/pt-BR/services/playfab/sdks/c/quickstart-android.md)
- [Início rápido GDK](/pt-BR/services/playfab/sdks/c/quickstart-gdk.md)
- [Início rápido Linux](/pt-BR/services/playfab/sdks/c/quickstart-linux.md)
- [Início rápido Win32](/pt-BR/services/playfab/sdks/c/quickstart-win32.md)
