Expand Minimize

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 WINAPI  WsEncodeUrl(
  _In_      const WS_URL* url,
  _In_      ULONG flags,
  _In_      WS_HEAP* heap,
  _Out_     WS_STRING* outUrl,
  _In_opt_  WS_ERROR* error
);

Parameters

url [in]

A reference to the WS_URL to encode.

flags [in]

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

heap [in]

A pointer to a WS_HEAP in which to allocate URL.

outUrl [out]

A pointer to the resulting URL string.

error [in, optional]

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