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

# XAppCaptureMetadataAddStringEvent

> XAppCaptureMetadataAddStringEvent

Add a metadata event with a string value to your app capture.

## Syntax

```cpp theme={null}
HRESULT XAppCaptureMetadataAddStringEvent(  
         const char* name,  
         const char* value,  
         XAppCaptureMetadataPriority priority  
)  
```

### Parameters

*name*   \_In\_z\_\
Type: char\*

Name of the event being added to the app capture timeline.

*value*   \_In\_z\_\
Type: char\*

Value of the event being added to the timeline. Must be a string.

*priority*   \_In\_\
Type: [XAppCaptureMetadataPriority](https://docs.xbox.com/reference/system/xappcapture/enums/xappcapturemetadatapriority.md)

Priority of the metadata. Used to determine what is saved in the case that storage limiters are exceeded. A member of the [XAppCaptureMetaDataPriority](https://docs.xbox.com/reference/system/xappcapture/enums/xappcapturemetadatapriority.md) enumeration.

### Return value

Type: HRESULT

Function result.

## Remarks

> [!NOTE]
>
> This function isn't safe to call on a time-sensitive thread. For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).

The system associates a metadata event with a timestamp when this method is called. This metadata is used to identify events during live streams, and captured playback to categorize and search content. To store a string value that applies to a window of time, use [XAppCaptureMetaDataStartStringState](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate.md).

> [!NOTE]
>
> Metadata may be uploaded to XBOX Live and/or saved to .mp4 files, screenshots or used during broadcast, as such, private user info should never be logged with meta data.

## Requirements

**Header:** XAppCapture.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[GameDVR Overview](https://docs.xbox.com/build/console-features/game-dvr/gamedvr-broadcast.md)\
[XAppCapture Members](https://docs.xbox.com/reference/system/xappcapture/xappcapture_members.md)\
[XAppCaptureMetadataAddDoubleEvent](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadataadddoubleevent.md)\
[XAppCaptureMetadataAddInt32Event](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartint32state.md)


## Related topics

- [XAppCaptureMetadataAddDoubleEvent](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadataadddoubleevent.md)
- [XAppCaptureMetadataAddInt32Event](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadataaddint32event.md)
- [XAppCaptureMetadataStartStringState](https://docs.xbox.com/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate.md)
- [XAppCapture (API contents)](https://docs.xbox.com/reference/system/xappcapture/xappcapture_members.md)
- [Using C# wrappers for GDK APIs in your Unity project](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)
