IBackgroundCopyJobHttpOptions::GetCustomHeaders method (bits2_5.h)
Retrieves the custom headers set by an earlier call to IBackgroundCopyJobHttpOptions::SetCustomHeaders (that is, headers which BITS will be sending to the remote, not headers which BITS receives from the remote).
Syntax
HRESULT GetCustomHeaders(
[out] LPWSTR *pRequestHeaders
);
Parameters
[out] pRequestHeaders
Null-terminated string that contains the custom headers. Each header is terminated by a carriage return and line feed (CR/LF) character. To free the string when finished, call the CoTaskMemFree function.
Return value
The following table lists some of the possible return values.
Return code | Description |
---|---|
|
Successfully retrieved the headers. |
|
The job does not specify custom headers. |
|
Either you don't have permission to retrieve the custom headers, or [IBackgroundCopyJobHttpOptions3::MakeCustomHeadersWriteOnly](/windows/desktop/api/bits10_3/nf-bits10_3-ibackgroundcopyjobhttpoptions3-makecustomheaderswriteonly) has been called on the job. |
|
The pRequestHeaders parameter is NULL. |
Remarks
Only the job owner can retrieve the custom headers. To specify the headers, call the IBackgroundCopyJobHttpOptions::SetCustomHeaders method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | bits2_5.h (include Bits.h) |
Library | Bits.lib |