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

# PFEventPipelineCreatePlayStreamPipelineHandle

> Creates an event pipeline to upload PlayStream events using an Entity.

Creates an event pipeline to upload PlayStream events using an Entity.

## Syntax

```cpp theme={null}
HRESULT PFEventPipelineCreatePlayStreamPipelineHandle(  
    PFEntityHandle entityHandle,  
    XTaskQueueHandle queue,  
    PFEventPipelineBatchUploadSucceededEventHandler* eventPipelineBatchUploadedEventHandler,  
    PFEventPipelineBatchUploadFailedEventHandler* eventPipelineBatchFailedEventHandler,  
    void* handlerContext,  
    PFEventPipelineHandle* eventPipelineHandle  
)  
```

### Parameters

**`entityHandle`**   PFEntityHandle

The Entity whose token will be used to make the PlayFab service requests in the background.

**`queue`**   XTaskQueueHandle<br />*optional*

The async queue where background work will be scheduled and where event callbacks will be invoked.

**`eventPipelineBatchUploadedEventHandler`**   PFEventPipelineBatchUploadSucceededEventHandler\*<br />*optional*

Optional handler that will be invoked when a batch of events is uploaded.

**`eventPipelineBatchFailedEventHandler`**   PFEventPipelineBatchUploadFailedEventHandler\*<br />*optional*

Optional handler that will be invoked when uploading a batch of events fails.

**`handlerContext`**   void\*<br />*optional*

Optional pointer to data used by the event handlers.

**`eventPipelineHandle`**   PFEventPipelineHandle\*<br />*output*

Handle to the created pipeline. Needs to be closed with PFEventPipelineCloseHandle when it isn't needed.

### Return value

Type: HRESULT

Result code for this API operation. Possible values are S\_OK, E\_INVALIDARG, E\_PF\_NOT\_INITIALIZED or E\_FAIL.

## Requirements

**Header:** PFEventPipeline.h

## See also

[PFEventPipeline members](/services/playfab/api-references/c/pfeventpipeline/pfeventpipeline_members)


## Related topics

- [Services C API overview - PFEventPipeline.h](/services/playfab/api-references/c/pfeventpipeline/pfeventpipeline_members.md)
- [PlayFab Services SDK - Event Pipeline](/services/playfab/sdks/c/event-pipeline/eventpipeline.md)
- [PFEventPipelineCreateTelemetryPipelineHandleWithEntity](/services/playfab/api-references/c/pfeventpipeline/functions/pfeventpipelinecreatetelemetrypipelinehandlewithentity.md)
- [PFEventPipelineCreateTelemetryPipelineHandleWithKey](/services/playfab/api-references/c/pfeventpipeline/functions/pfeventpipelinecreatetelemetrypipelinehandlewithkey.md)
- [Event Pipeline Tutorial](/services/playfab/sdks/c/event-pipeline/eventpipeline-tutorial.md)
