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

# PFInitialize

> Initializes PlayFabCore global state on non-Android platforms so PlayFab client APIs can be used. Custom platform hooks must be configured beforehand.

Initialize PlayFabCore global state. Custom platform hooks must be configured prior to calling PFInitialize.

## Syntax

```cpp theme={null}
HRESULT PFInitialize(  
    XTaskQueueHandle backgroundQueue  
)  
```

### Parameters

**`backgroundQueue`**   XTaskQueueHandle\
*optional*

An XTaskQueue that should be used for background work. If no queue is provided then a default (threadpool) queue will be used.

### Return value

Type: HRESULT

Result code for this API operation.

## Requirements

**Header:** PFCore.h

## See also

[PFCore members](https://docs.xbox.com/services/playfab/api-references/c/pfcore/pfcore_members.md)


## Related topics

- [PFInitialize](https://docs.xbox.com/services/playfab/api-references/c/pfcore/functions/pfinitialize_2.md)
- [PFServicesInitialize](https://docs.xbox.com/services/playfab/api-references/c/pfservices/functions/pfservicesinitialize.md)
- [PFGameSaveFilesInitialize](https://docs.xbox.com/services/playfab/api-references/c/pfgamesavefiles/functions/pfgamesavefilesinitialize.md)
- [Services C API overview - PFCore.h](https://docs.xbox.com/services/playfab/api-references/c/pfcore/pfcore_members.md)
- [Memory hooking](https://docs.xbox.com/services/playfab/sdks/c/memory.md)
