UrlEscapeW(3w)

UrlEscapeW3w

Usage

HRESULT UrlEscapeW
(
LPCWSTR pszUrl,
LPWSTR pszEscaped,
LPDWORD pcchEscaped,
DWORD dwFlags
)

Overview

Converts unsafe characters in a Url into escape sequences.

Params

pszUrl [In] Url to modify.

pszEscaped [Out] Destination for modified Url.

pcchEscaped [In/Out] Length of pszUrl, destination for length of pszEscaped.

dwFlags [In] URL_ flags from "shlwapi.h".

Returns

Success: S_OK. pszEscaped contains the escaped Url, pcchEscaped contains its length.

Failure: E_POINTER, if pszEscaped is not large enough. In this case pcchEscaped is set to the required length.

Converts unsafe characters into their escape sequences.

Notes

- By default this function stops converting at the first '?' or '#' character.

- If dwFlags contains URL_ESCAPE_SPACES_ONLY then only spaces are converted, but the conversion continues past a '?' or '#'.

- Note that this function did not work well (or at all) in shlwapi version 4.

Implementation

Declared in "shlwapi.h".

Implemented in "dlls/shlwapi/url.c".

Debug channel "shell".

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

Bugs

Only the following flags are implemented:

URL_ESCAPE_SPACES_ONLY

URL_DONT_ESCAPE_EXTRA_INFO

URL_ESCAPE_SEGMENT_ONLY

URL_ESCAPE_PERCENT

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.