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

# PFServicesInitialize (background queue overload)

> Overload of PFServicesInitialize that accepts a background XTaskQueueHandle and HCInitArgs to initialize PlayFab Services global state with custom HTTP.

Initializes PlayFab Services global state

## Syntax

```cpp theme={null}
HRESULT PFServicesInitialize(  
    XTaskQueueHandle backgroundQueue,  
    HCInitArgs* initArgs  
)  
```

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

**`initArgs`**   HCInitArgs\*

TBD

### Return value

Type: HRESULT

Result code for this API operation.

## Remarks

This will internally call PFInitialize(nullptr) if it hasn't been called already by the title. If control of PFCore background work is needed, the title should explicitly call PFInitialize and PFUninitialize.

## Requirements

**Header:** PFServices.h

## See also

[PFServices members](/services/playfab/api-references/c/pfservices/pfservices_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)
- [PFInitialize](/services/playfab/api-references/c/pfcore/functions/pfinitialize.md)
- [SDK Lifecycle](/services/playfab/sdks/c/lifecycle.md)
- [Services C API overview - PFServices.h](/services/playfab/api-references/c/pfservices/pfservices_members.md)
