IPropertyDescriptionRelatedPropertyInfo::GetRelatedProperty method (propsys.h)

Retrieves an IPropertyDescription object that represents the related property.

Syntax

HRESULT GetRelatedProperty(
  [in]  LPCWSTR pszRelationshipName,
  [in]  REFIID  riid,
  [out] void    **ppv
);

Parameters

[in] pszRelationshipName

Type: LPCWSTR

A pointer to a string that contains the relationship of the property to get.

[in] riid

Type: REFIID

A reference to the IID of the interface to retrieve through the ppv parameter, typically IID_IPropertyDescription.

[out] ppv

Type: void**

Receives the interface pointer requested in the parameter. This is typically IPropertyDescription.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

We recommend that you use the IID_PPV_ARGS macro, defined in Objbase.h, to package the riid and ppv parameters. This macro provides the correct IID based on the interface pointed to by the value in ppv, which eliminates the possibility of a coding error in riid that could lead to unexpected results.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header propsys.h

See also

IPropertyDescriptionRelatedPropertyInfo

Property Description Schema