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

# PIXBeginRetailEvent(void*,UINT64, PCWSTR, ...)

> PIXBeginRetailEvent

Starts a user-defined retail event.

## Syntax

```cpp theme={null}
void PIXBeginRetailEvent(  
         void* context,  
         UINT64 color,  
         PCWSTR formatString,
         ...  
)  
```

### Parameters

*context*   \
Type: void\*

Context for the event, accepts `ID3D12GraphicsCommandList\*`, `ID3D12GraphicsCommandList\*` and `ID3D12XboxDmaCommandList\*` (XBOX only).

*color*   \
Type: UINT64

The event color to use in the system timing chart. Use [PIX\_COLOR](https://docs.xbox.com/reference/tools/pix3/functions/pix_color.md) to specify a color, [PIX\_COLOR\_INDEX](https://docs.xbox.com/reference/tools/pix3/functions/pix_color_index.md) to specify a color index, or pass in a raw DWORD noting that the format is ARGB and the alpha channel value must be 0xff.\
*formatString*   \_In\_\
Type: PCWSTR

The name to use to describe the event, as a pointer to a null-terminated Unicode string. The string may specify zero or more optional string format placeholders, very similar to `sprintf` formatting.

Type: ...

If placeholders are used in *formatString*, there must be a corresponding number of parameters whose types depend on the placeholders. This method supports up to a maximum of 16 format parameters.

### Return value

Type: void

## Remarks

With a debug or instrumented device, `PIXBeginRetailEvent` behaves identically to [PIXBeginEvent](https://docs.xbox.com/reference/tools/pix3/functions/pixbeginevent.md). For a retail device, the events will be included in HIX files for GPU hang debugging.

`PIXBeginRetailEvent` and `PIXEndRetailEvent` pairs can be nested to any depth.

## Requirements

**Header:** pix3.h

**Library:** pixevt.lib
**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[PIX (NDA topic)](https://docs.xbox.com/tools/tools-console/pix/pix.md)\
[pix3](https://docs.xbox.com/reference/tools/pix3/pix3_members.md)\
[PIXEndRetailEvent](https://docs.xbox.com/reference/tools/pix3/functions/pixendretailevent.md)\
[PIXBeginRetailEvent(void\*, UINT64, PCSTR, ...)](https://docs.xbox.com/reference/tools/pix3/functions/pixbeginretailevent.md)


## Related topics

- [PIXBeginRetailEvent(void*, UINT64, PCSTR, ...)](https://docs.xbox.com/reference/tools/pix3/functions/pixbeginretailevent.md)
- [PIXBeginEvent](https://docs.xbox.com/reference/tools/pix3/functions/pixbeginevent-overloads.md)
- [PIXSetRetailMarker(void*, UINT64, PCWSTR, ...)](https://docs.xbox.com/reference/tools/pix3/functions/pixsetretailmarker_2.md)
- [PIXBeginEvent(void*, UINT64, PCWSTR, ...)](https://docs.xbox.com/reference/tools/pix3/functions/pixbeginevent_4.md)
- [PIXBeginEvent(UINT64, PCWSTR, ...)](https://docs.xbox.com/reference/tools/pix3/functions/pixbeginevent_2.md)
