Expand Minimize

PropVariantToWinRTPropertyValue function

Extracts data from a PROPVARIANT structure into a Windows Runtime property value. Note that in some cases more than one PROPVARIANT type maps to a single Windows Runtime property type.

Syntax


HRESULT PSSTDAPI PropVariantToWinRTPropertyValue(
  _In_   REFPROPVARIANT propvar,
  _In_   REFIID riid,
  _Out_  void **ppv
);

Parameters

propvar [in]

Reference to a source PROPVARIANT structure.

riid [in]

A reference to the IID of the interface to retrieve through ppv, typically IID_IPropertyValue (defined in Windows.Foundation.h).

ppv [out]

When this method returns successfully, contains the interface pointer requested in riid. This is typically an IPropertyValue pointer. If the call fails, this value is NULL.

Return value

If this function 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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Windows.Foundation.h

Library

Propsys.lib

DLL

Propsys.dll

See also

PropertyValue class

 

 

Community Additions

ADD
Show:
© 2014 Microsoft