Condividi tramite


Uri_PROPERTY enumeration

Represents properties that an IUri can contain. The properties in the range Uri_PROPERTY_STRING_START to Uri_PROPERTY_STRING_LAST are strings and the rest are DWORD values.

Syntax

typedef enum  { 
  Uri_PROPERTY_ABSOLUTE_URI    = 0,
  Uri_PROPERTY_STRING_START    = Uri_PROPERTY_ABSOLUTE_URI,
  Uri_PROPERTY_AUTHORITY       = 1,
  Uri_PROPERTY_DISPLAY_URI     = 2,
  Uri_PROPERTY_DOMAIN          = 3,
  Uri_PROPERTY_EXTENSION       = 4,
  Uri_PROPERTY_FRAGMENT        = 5,
  Uri_PROPERTY_HOST            = 6,
  Uri_PROPERTY_PASSWORD        = 7,
  Uri_PROPERTY_PATH            = 8,
  Uri_PROPERTY_PATH_AND_QUERY  = 9,
  Uri_PROPERTY_QUERY           = 10,
  Uri_PROPERTY_RAW_URI         = 11,
  Uri_PROPERTY_SCHEME_NAME     = 12,
  Uri_PROPERTY_USER_INFO       = 13,
  Uri_PROPERTY_USER_NAME       = 14,
  Uri_PROPERTY_STRING_LAST     = Uri_PROPERTY_USER_NAME,
  Uri_PROPERTY_HOST_TYPE       = 15,
  Uri_PROPERTY_DWORD_START     = Uri_PROPERTY_HOST_TYPE,
  Uri_PROPERTY_PORT            = 16,
  Uri_PROPERTY_SCHEME          = 17,
  Uri_PROPERTY_ZONE            = 18,
  Uri_PROPERTY_DWORD_LAST      = Uri_PROPERTY_ZONE
} Uri_PROPERTY;

Constants

  • Uri_PROPERTY_ABSOLUTE_URI
    Includes the entire canonicalized URI. This property is not defined for relative URLs. See also Uri_PROPERTY_RAW_URI.

    ftp://username:password@hostname.domain.com:8080/path/file.ext?query#fragment
    
  • Uri_PROPERTY_STRING_START
    Designates the first string property.

  • Uri_PROPERTY_AUTHORITY
    Combines user name, password, fully qualified domain name, and port number. If user name and password are not specified, the separator characters (: and @) are removed. The trailing colon is also removed if the port number is not specified or is the default for the protocol scheme.

    username:password@hostname.domain.com:8080
    
  • Uri_PROPERTY_DISPLAY_URI
    Combines protocol scheme, fully qualified domain name, port number, full path, query string, and (optionally) fragment. (Pass the Uri_DISPLAY_NO_FRAGMENT flag to get one or more of the following methods to hide the fragment portion: IUri::GetPropertyBSTR and IUri::GetPropertyLength.) If the scheme is unrecognized, the user name and password will also be displayed.

    ftp://hostname.domain.com:8080/path/file.ext?query#fragment
    

    Note   The display URI may have additional formatting applied to it, such that the string produced by IUri::GetDisplayUri isn't necessarily a valid URI. For this reason, and since the userinfo is not present, the display URI should be used for viewing only; it should not be used for edit by the user, or as a form of transfer for URIs inside or between applications.

     

  • Uri_PROPERTY_DOMAIN
    Indicates the private domain name and public suffix (top-level domain) only. If the URL contains only a plain hostname (for example, "http://example/") or public suffix (for example, "http://co.uk/"), then Uri_PROPERTY_DOMAIN is NULL; use Uri_PROPERTY_HOST instead.

    domain.com
    
  • Uri_PROPERTY_EXTENSION
    Indicates the file name extension only.

    .ext
    
  • Uri_PROPERTY_FRAGMENT
    Indicates the fragment (secondary resource, or named anchor identifier) only.

    #fragment
    
  • Uri_PROPERTY_HOST
    Indicates the fully qualified domain name or plain hostname. See also Uri_PROPERTY_DOMAIN.

    hostname.domain.com
    
  • Uri_PROPERTY_PASSWORD
    Indicates the password only, as parsed from the URI. Prompted credentials do not appear here.

    password
    

Security Warning: Storing sensitive information as clear text in a URI is not recommended. According to RFC3986: Uniform Resource Identifier (URI), Generic Syntax, Section 7.5, "A password appearing within the userinfo component is deprecated and should be considered an error except in those rare cases where the 'password' parameter is intended to be public."

  • Uri_PROPERTY_PATH
    Indicates the path and resource.

    /path/file.ext
    
  • Uri_PROPERTY_PATH_AND_QUERY
    Combines full path to resource with URI query string.

    /path/file.ext?query
    
  • Uri_PROPERTY_QUERY
    Indicates the query (or search) string. The search string may be canonicalized by CreateUri if the Uri_CREATE_DECODE_EXTRA flag was used; however, no other encoding or decoding is performed.

    ?query
    
  • Uri_PROPERTY_RAW_URI
    Includes the entire original URI as entered. Note that character %61 is lowercase A in the following example. See also Uri_PROPERTY_ABSOLUTE_URI.

    ftp://username:password@hostn%61me.domain.com:8080/path/file.ext?query#fragment
    
  • Uri_PROPERTY_SCHEME_NAME
    Indicates the protocol scheme name. See also Uri_PROPERTY_SCHEME.

    ftp
    
  • Uri_PROPERTY_USER_INFO
    Combines user name and password as parsed from the URI. String does not include colon (:) if password is not present.

    username:password
    
  • Uri_PROPERTY_USER_NAME
    Indicates the user name only, as parsed from the URI. Prompted credentials do not appear here.

    username
    
  • Uri_PROPERTY_STRING_LAST
    Designates the final string property.

  • Uri_PROPERTY_HOST_TYPE
    Returns a value from the Uri_HOST_TYPE enumeration.

  • Uri_PROPERTY_DWORD_START
    Designates the first numerical property.

  • Uri_PROPERTY_PORT
    Indicates the port number only.

    8080
    
  • Uri_PROPERTY_SCHEME
    Returns a value from the URL_SCHEME enumeration. See also Uri_PROPERTY_SCHEME_NAME.

  • Uri_PROPERTY_ZONE
    Not implemented. To calculate the zone of a URI object, pass the URI to the IInternetSecurityManagerEx2::MapUrlToZoneEx2 method.

  • Uri_PROPERTY_DWORD_LAST
    Designates the final numerical property.

Requirements

Minimum supported client

Windows XP with SP2

Minimum supported server

Windows Server 2003 with SP1

Product

Internet Explorer 7

Header

Urlmon.h

IDL

Urlmon.idl

See also

Reference

CreateUri

GetPropertyBSTR

GetPropertyDWORD

GetPropertyLength

HasProperty