WsCombineUrl function (webservices.h)
Produces an absolute URL from a specified URL reference (absolute or relative URL) and a specified absolute base URL.
Syntax
HRESULT WsCombineUrl(
[in] const WS_STRING *baseUrl,
[in] const WS_STRING *referenceUrl,
[in] ULONG flags,
[in] WS_HEAP *heap,
[out] WS_STRING *resultUrl,
[in, optional] WS_ERROR *error
);
Parameters
[in] baseUrl
Pointer to a WS_STRING structure containing an absolute URL in encoded format.
[in] referenceUrl
Pointer to a WS_STRING structure containing an absolute or relative URL in encoded format.
[in] flags
Controls the format of the resulting URL. For more information, see WS_URL_FLAGS.
[in] heap
Pointer to the WS_HEAP object from which the memory for the resulting URL is allocated.
[out] resultUrl
Pointer to a WS_STRING structure that receives the resulting URL. This is an absolute URL in encoded format.
[in, optional] error
Pointer to a WS_ERROR structure that receives additional error information if the function fails.
Return value
If the function succeeds, it returns NO_ERROR; otherwise, it returns an HRESULT error code.
Return code | Description |
---|---|
|
One or more arguments are not valid. |
|
Insufficient memory to complete the operation. |
|
The base URL or reference URL was not in the correct format, or had a scheme that was not recognized. |
|
This function may return other errors not listed above. |
Remarks
If the reference URL is absolute, it is returned unchanged, if the specified flags permit. If the reference URL is relative, it is combined with the base URL before being returned.
Only the schemes listed in WS_URL_SCHEME_TYPE are supported.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | webservices.h |
Library | WebServices.lib |
DLL | WebServices.dll |