IUri::GetPropertyBSTR method
Returns the specified Uniform Resource Identifier (URI) property value in a new BSTR.
Syntax
HRESULT GetPropertyBSTR( [in] Uri_PROPERTY uriProp, [out] BSTR *pbstrProperty, [in] DWORD dwFlags );
Parameters
- uriProp [in]
-
A value from the Uri_PROPERTY enumeration.
- pbstrProperty [out]
-
Address of a BSTR that receives the property value.
- dwFlags [in]
-
One of the following property-specific flags, or zero.
-
Uri_PROPERTY_DISPLAY_URI: Exclude the fragment portion of the URI, if any.
-
Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DOMAIN, Uri_PROPERTY_HOST: If the URI is an IDN, always display the hostname encoded as punycode.
-
Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DOMAIN, Uri_PROPERTY_HOST: Display the hostname in punycode or Unicode as it would appear in the Uri_PROPERTY_DISPLAY_URI property.
Return value
Returns one of the following values:
| Return code | Description |
|---|---|
|
Success. |
|
The property is not defined. |
|
Property value is not a string. |
|
There is insufficient memory to create the BSTR. |
Remarks
IUri::GetPropertyBSTR was introduced in Windows Internet Explorer 7.
The uriProp parameter must be a string property. This method will fail if the specified property isn't a BSTR property.
The pbstrProperty parameter will be set to a new BSTR containing the value of the specified string property. The caller should use SysFreeString to free the string.
This method will return S_FALSE and set pbstrProperty to an empty string if the URI doesn't contain the specified property.
Requirements
|
Minimum supported client |
Windows XP with SP2 |
|---|---|
|
Minimum supported server |
Windows Server 2003 with SP1 |
|
Product |
Internet Explorer 7 |
|
Header |
|
|
IDL |
|
|
DLL |
|
See also
- IUri
- Reference
- GetAbsoluteUri
- GetAuthority
- GetDisplayUri
- GetDomain
- GetExtension
- GetFragment
- GetHost
- GetPassword
- GetPath
- GetPathAndQuery
- GetPropertyDWORD
- GetQuery
- GetRawUri
- GetSchemeName
- GetUserInfo
- GetUserName