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

# PFEntityGetEntityKeySize

> Get the size in bytes needed to store the PFEntityKey for an Entity.

Get the size in bytes needed to store the PFEntityKey for an Entity.

## Syntax

```cpp theme={null}
HRESULT PFEntityGetEntityKeySize(  
    PFEntityHandle entityHandle,  
    size_t* bufferSize  
)  
```

### Parameters

**`entityHandle`**   PFEntityHandle

PFEntityHandle returned from a auth call.

**`bufferSize`**   size\_t\*<br />*output*

The buffer size in bytes required for the EntityKey.

### Return value

Type: HRESULT

Result code for this API operation.

## Requirements

**Header:** PFEntity.h

## See also

[PFEntity members](/services/playfab/api-references/c/pfentity/pfentity_members)


## Related topics

- [PFEntityGetEntityKey](/services/playfab/api-references/c/pfentity/functions/pfentitygetentitykey.md)
- [Entity Handles](/services/playfab/sdks/c/entity-handles.md)
- [Services C API overview - PFEntity.h](/services/playfab/api-references/c/pfentity/pfentity_members.md)
- [PFEntityGetSecretKeySize](/services/playfab/api-references/c/pfentity/functions/pfentitygetsecretkeysize.md)
- [PFEntityGetSecretKey](/services/playfab/api-references/c/pfentity/functions/pfentitygetsecretkey.md)
