Поделиться через


IUri::GetPassword method

Returns the password, as parsed from the Uniform Resource Identifier (URI).

Syntax

HRESULT GetPassword(
  [out] BSTR *pbstrPassword
);

Parameters

  • pbstrPassword [out]
    Address of a BSTR that receives the property value. Caller is responsible for freeing the memory with SysFreeString.

Return value

Returns one of the following values:

Return code Description
S_OK

Success.

S_FALSE

The property is not defined.

E_OUTOFMEMORY

There is insufficient memory to create the BSTR.

 

Remarks

IUri::GetPassword was introduced in Windows Internet Explorer 7.

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

This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the Uri_PROPERTY_PASSWORD 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

DLL

Urlmon.dll

See also

IUri

Reference

GetUserInfo

GetUserName