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

# HCHttpCallSetContext

> HCHttpCallSetContext

# HCHttpCallSetContext

设置附加到此调用对象的上下文指针。

## Syntax

```cpp theme={null}
HRESULT HCHttpCallSetContext(  
         HCCallHandle call,  
         void* context  
)  
```

### Parameters

*call*   \_In\_\
Type: HCCallHandle

HTTP 调用的句柄。

*context*   \_In\_opt\_\
Type: void\*

附加到此调用对象的上下文指针。

### Return value

Type: HRESULT

此 API 操作的结果代码。可能的值为 S\_OK、E\_INVALIDARG 或 E\_FAIL。

## Requirements

**Header:** httpProvider.h

**Library:** libHttpClient.GDK.lib

## See also

[httpProvider](/reference/live/httpclient/httpprovider/httpprovider_members)


## Related topics

- [HCSetHttpCallPerformFunction](/zh-CN/reference/live/httpclient/httpprovider/functions/hcsethttpcallperformfunction.md)
- [HCHttpCallResponseSetResponseBodyWriteFunction](/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallresponsesetresponsebodywritefunction.md)
- [HCHttpCallRequestSetRequestBodyReadFunction](/zh-CN/reference/live/httpclient/httpclient/functions/hchttpcallrequestsetrequestbodyreadfunction.md)
- [HCHttpCallGetContext](/zh-CN/reference/live/httpclient/httpprovider/functions/hchttpcallgetcontext.md)
- [XblHttpCallRequestSetLongHttpCall](/zh-CN/reference/live/xsapi-c/http_call_c/functions/xblhttpcallrequestsetlonghttpcall.md)
