---
name: "UrlEscapeW"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/UrlEscapeW"
---

# UrlEscapeW(3w)

## NAME

**UrlEscapeW** (SHLWAPI.@)

## SYNOPSIS

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

## DESCRIPTION

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.**

## BUGS

Only the following flags are implemented: \
\
      URL\_ESCAPE\_SPACES\_ONLY\
\
      URL\_DONT\_ESCAPE\_EXTRA\_INFO\
\
      URL\_ESCAPE\_SEGMENT\_ONLY\
\
      URL\_ESCAPE\_PERCENT

## IMPLEMENTATION

Declared in **"shlwapi.h"**.

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

Debug channel **"shell"**.
