Condividi tramite


CreateUriWithFragment function

Creates a new IUri instance (and optional fragment), and initializes the instance from a Uniform Resource Identifier (URI) string.

Syntax

STDAPI CreateUriWithFragment(
  _In_       LPCWSTR   pwzURI,
  _In_       LPCWSTR   pwzFragment,
  _In_       DWORD     dwFlags,
  _Reserved_ DWORD_PTR dwReserved,
  _Out_      IUri      **ppURI
);

Parameters

  • pwzURI [in]
    A constant pointer to an UTF-8 character string that specifies the URI.

  • pwzFragment [in]
    A constant pointer to a UTF-8 character string that specifies the explicit fragment, or NULL.

  • dwFlags [in]
    A valid combination of flags. Refer to CreateUri for a complete list of flags and values.

  • dwReserved [in]
    Reserved. Must be set to 0.

  • ppURI [out]
    An IUri interface pointer that will receive the new instance.

Return value

Returns one of the following values.

Return code Description
S_OK

Success.

E_INVALIDARG

dwFlags conflict, or ppURI is NULL.

E_OUTOFMEMORY

There is insufficient memory to create the IUri.

INET_E_INVALID_URL

The string does not contain a recognized URI format.

INET_E_SECURITY_PROBLEM

The URI contains syntax that attempts to bypass security.

 

Remarks

This function is identical to CreateUri, except that an explicit fragment can be specified. You cannot specify an explicit fragment and an implicit fragment in the URI; the function will fail with E_INVALIDARG. The explicit fragment can start with the delimiting "#," but it will be removed.

Requirements

Minimum supported client

Windows XP with SP2

Minimum supported server

Windows Server 2003 with SP1

Product

Internet Explorer 7

Header

Urlmon.h

Library

Urlmon.lib

DLL

Urlmon.dll

See also

Reference

CreateUri

CreateUriFromMultiByteString