IPropertyStore::GetAt method

Gets a property key from an item's array of properties.

Syntax

HRESULT GetAt(
  [in]  DWORD       iProp,
  [out] PROPERTYKEY *pkey
);

Parameters

  • iProp [in]
    Type: DWORD

    The index of the property key in the array of PROPERTYKEY structures. This is a zero-based index.

  • pkey [out]
    Type: PROPERTYKEY*

    When this method returns, contains a PROPERTYKEY structure that receives the unique identifier for a property.

Return value

Type: HRESULT

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

Remarks

The PROPERTYKEY returned in pkey can be used in subsequent calls to IPropertyStore::GetValue and IPropertyStore::SetValue.

There is no specific order to an item's set of enumerated properties. To find a specific property, you must walk the array until you find the property that matches your criteria.

iProp cannot be greater than or equal to the cProps parameter retrieved by IPropertyStore::GetCount. If it is greater than or equal to that value, IPropertyStore::GetAt returns E_INVALIDARG and pkey is set to NULL by the property handler.

Requirements

Minimum supported client

Windows Vista [desktop apps | UWP apps]

Minimum supported server

Windows Server 2008 [desktop apps | UWP apps]

Header

Propsys.h

IDL

Propsys.idl