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

# 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<br />*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](/services/playfab/api-references/c/pfcore/pfcore_members)


## Related topics

- [PFInitialize (Android overload)](/services/playfab/api-references/c/pfcore/functions/pfinitialize_2.md)
- [PFServicesInitialize](/services/playfab/api-references/c/pfservices/functions/pfservicesinitialize.md)
- [PFServicesInitialize (background queue overload)](/services/playfab/api-references/c/pfservices/functions/pfservicesinitialize_2.md)
- [Services C API overview - PFCore.h](/services/playfab/api-references/c/pfcore/pfcore_members.md)
- [Memory hooking](/services/playfab/sdks/c/memory.md)
