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

# XblMultiplayerCreateSearchHandleAsync

> XblMultiplayerCreateSearchHandleAsync

# XblMultiplayerCreateSearchHandleAsync

Create a search handle associated with an existing session. This makes the session queryable.

## Syntax

```cpp theme={null}
HRESULT XblMultiplayerCreateSearchHandleAsync(  
         XblContextHandle xblContext,  
         const XblMultiplayerSessionReference* sessionRef,  
         const XblMultiplayerSessionTag* tags,  
         size_t tagsCount,  
         const XblMultiplayerSessionNumberAttribute* numberAttributes,  
         size_t numberAttributesCount,  
         const XblMultiplayerSessionStringAttribute* stringAttributes,  
         size_t stringAttributesCount,  
         XAsyncBlock* async  
)  
```

### Parameters

*xblContext*   \_In\_\
Type: [XblContextHandle](/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

XBOX live context for the local user.

*sessionRef*   \_In\_\
Type: [XblMultiplayerSessionReference\*](/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayersessionreference)

Session reference to create a search handle for.

*tags*   \_In\_reads\_opt\_(tagsCount)\
Type: [XblMultiplayerSessionTag\*](/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayersessiontag)

Optional set of tags to attach to search handle.

*tagsCount*   \_In\_\
Type: size\_t

Count of tags.

*numberAttributes*   \_In\_reads\_opt\_(numberAttributesCount)\
Type: [XblMultiplayerSessionNumberAttribute\*](/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayersessionnumberattribute)

Optional attributes to attach to search handle.

*numberAttributesCount*   \_In\_\
Type: size\_t

Count of number attributes.

*stringAttributes*   \_In\_reads\_opt\_(stringAttributesCount)\
Type: [XblMultiplayerSessionStringAttribute\*](/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayersessionstringattribute)

Optional attributes to attach to search handle.

*stringAttributesCount*   \_In\_\
Type: size\_t

Count of string attributes.

*async*   \_In\_\
Type: XAsyncBlock\*

The AsyncBlock for this operation.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Requirements

**Header:** multiplayer\_c.h

**Library:** Microsoft.Xbox.Services.14x.GDK.C.lib

## See also

[multiplayer\_c](/reference/live/xsapi-c/multiplayer_c/multiplayer_c_members)


## Related topics

- [XblMultiplayerCreateSearchHandleResult](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayercreatesearchhandleresult.md)
- [XblMultiplayerDeleteSearchHandleAsync](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayerdeletesearchhandleasync.md)
- [XblMultiplayerGetSearchHandlesAsync](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayergetsearchhandlesasync.md)
- [XblMultiplayerGetSearchHandlesResult](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayergetsearchhandlesresult.md)
- [XblMultiplayerGetSearchHandlesResultCount](/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayergetsearchhandlesresultcount.md)
