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

# CreateUriWithFragment(3w)

## NAME

**CreateUriWithFragment** (URLMON.@)

## SYNOPSIS

HRESULT CreateUriWithFragment\
  (\
   LPCWSTR   *pwzURI*,\
   LPCWSTR   *pwzFragment*,\
   DWORD     *dwFlags*,\
   DWORD\_PTR *dwReserved*,\
   IUri\*\*    *ppURI*\
  )

## DESCRIPTION

Creates a new **IUri** object. This is almost the same as CreateUri, expect that it allows you to explicitly specify a fragment (*pwzFragment*) for *pwzURI*.

## PARAMS

*pwzURI* **\[In\]**  The **URI** to parse and perform canonicalization on.

*pwzFragment* **\[In\]**  The explicit fragment string which should be added to *pwzURI*.

*dwFlags* **\[In\]**  The flags which will be passed to CreateUri.

*dwReserved* **\[In\]**  Reserved (not used).

*ppURI* **\[Out\]**  The resulting IUri after parsing/canonicalization.

## RETURNS

**Success:** **S\_OK**. *ppURI* contains the pointer to the newly allocated IUri.

**Failure:** **E\_INVALIDARG** if *pwzURI* already contains a fragment and *pwzFragment* isn't **NULL**. Will also return **E\_INVALIDARG** for the same reasons as CreateUri will. **E\_OUTOFMEMORY** if any allocation fails.

## IMPLEMENTATION

Declared in **"urlmon.h"**.

Implemented in **"dlls/urlmon/uri.c"**.

Debug channel **"urlmon"**.
