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

# UrlCanonicalizeA(3w)

## NAME

**UrlCanonicalizeA** (SHLWAPI.@)

## SYNOPSIS

HRESULT UrlCanonicalizeA\
  (\
   LPCSTR  *pszUrl*,\
   LPSTR   *pszCanonicalized*,\
   LPDWORD *pcchCanonicalized*,\
   DWORD   *dwFlags*\
  )

## DESCRIPTION

Canonicalize a Url.

## PARAMS

*pszUrl* **\[In\]**  Url to cCanonicalize.

*pszCanonicalized* **\[Out\]**  Destination for converted Url.

*pcchCanonicalized* **\[In/Out\]**  Length of *pszUrl*, destination for length of *pszCanonicalized*.

*dwFlags* **\[In\]**  Flags controlling the conversion.

## RETURNS

**Success:** **S\_OK**. The *pszCanonicalized* contains the converted Url.

**Failure:** **E\_POINTER**, if \**pcchCanonicalized* is too small.

**MSDN** incorrectly describes the flags for this function. They should be: \
\
     URL\_DONT\_ESCAPE\_EXTRA\_INFO    0x02000000\
\
     URL\_ESCAPE\_SPACES\_ONLY        0x04000000\
\
     URL\_ESCAPE\_PERCENT            0x00001000\
\
     URL\_ESCAPE\_UNSAFE             0x10000000\
\
     URL\_UNESCAPE                  0x10000000\
\
     URL\_DONT\_SIMPLIFY             0x08000000\
\
     URL\_ESCAPE\_SEGMENT\_ONLY       0x00002000

## IMPLEMENTATION

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

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

Debug channel **"shell"**.
