Windows Dev Center

Expand Minimize

WsCombineUrl function

Produces an absolute URL from a specified URL reference (absolute or relative URL) and a specified absolute base URL.

Syntax


HRESULT WINAPI  WsCombineUrl(
  _In_     const WS_STRING* baseUrl,
  _In_     const WS_STRING* referenceUrl,
  _In_     ULONG            flags,
  _In_     WS_HEAP*         heap,
  _Out_    WS_STRING*       resultUrl,
  _In_opt_ WS_ERROR*        error
);

Parameters

baseUrl [in]

Pointer to a WS_STRING structure containing an absolute URL in encoded format.

referenceUrl [in]

Pointer to a WS_STRING structure containing an absolute or relative URL in encoded format.

flags [in]

Controls the format of the resulting URL. For more information, see WS_URL_FLAGS.

heap [in]

Pointer to the WS_HEAP object from which the memory for the resulting URL is allocated.

resultUrl [out]

Pointer to a WS_STRING structure that receives the resulting URL. This is an absolute URL in encoded format.

error [in, optional]

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 codeDescription
E_INVALIDARG

One or more arguments are not valid.

E_OUTOFMEMORY

Insufficient memory to complete the operation.

WS_E_INVALID_FORMAT

The base URL or reference URL was not in the correct format, or had a scheme that was not recognized.

Other Errors

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

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft