WsEncodeUrl function

Encodes the specified WS_URL into a URL string given its component parts. Values are escaped as necessary, combined, and stored in the specified WS_HEAP, and the result is returned as a WS_STRING.

Syntax

HRESULT WsEncodeUrl(
  const WS_URL *url,
  ULONG        flags,
  WS_HEAP      *heap,
  WS_STRING    *outUrl,
  WS_ERROR     *error
);

Parameters

url

A reference to the WS_URL to encode.

flags

The value of this parameter determines the URL scheme evaluation method. See WS_URL_FLAGS.

heap

A pointer to a WS_HEAP in which to allocate URL.

outUrl

A pointer to the resulting URL string.

error

A pointer to a WS_ERROR object where additional information about the error should be stored if the function fails.

Return Value

This function can return one of these values.

Return code Description
E_INVALIDARG
One or more arguments are invalid.
E_OUTOFMEMORY
Ran out of memory.
WS_E_INVALID_FORMAT
The URL data being encoded was not valid according to the URL syntax.
Other Errors
This function may return other errors not listed above.

Remarks

If a scheme is not recognized in the url parameter the function returns WS_E_INVALID_FORMAT.
Only scheme types identified in WS_URL_SCHEME_TYPE are supported.

Requirements

   
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