Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds one or more HTTP request headers to an HTTP request handle, allowing you to use separate name/value strings.
Syntax
WINHTTPAPI DWORD WinHttpAddRequestHeadersEx(
HINTERNET hRequest,
DWORD dwModifiers,
ULONGLONG ullFlags,
ULONGLONG ullExtra,
DWORD cHeaders,
WINHTTP_EXTENDED_HEADER *pHeaders
);
Parameters
hRequest
Type: IN HINTERNET
An HINTERNET handle returned by a call to WinHttpOpenRequest.
dwModifiers
Type: IN DWORD
An unsigned long integer value that contains the flags used to modify the semantics of this function. Can be one or more of the following flags.
ullFlags
Type: IN ULONGLONG
Pass WINHTTP_EXTENDED_HEADER_FLAG_UNICODE to indicate that the strings passed in are Unicode strings.
ullExtra
Type: IN ULONGLONG
Reserved.
cHeaders
Type: IN DWORD
The number of elements in pHeaders.
pHeaders
Type: _In_reads_(cHeaders) WINHTTP_EXTENDED_HEADER*
An array of WINHTTP_EXTENDED_HEADER structures.
Return value
A status code indicating the result of the operation. Among the error codes returned are the following.
| Error Code | Description |
|---|---|
|
The requested operation cannot be performed because the handle supplied is not in the correct state. |
|
The type of handle supplied is incorrect for this operation. |
|
An internal error has occurred. |
|
Not enough memory was available to complete the requested operation. |
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 10 Build 20348 |
| Minimum supported server | Windows 10 Build 20348 |
| Target Platform | Windows |
| Header | winhttp.h |
| Library | Winhttp.lib |
| DLL | Winhttp.dll |