IMetaDataImport::GetCustomAttributeProps method (rometadataapi.h)

Gets the value of the custom attribute, given its metadata token.

Syntax

HRESULT GetCustomAttributeProps(
  [in]  mdCustomAttribute cv,
  [out] mdToken           *ptkObj,
  [out] mdToken           *ptkType,
  [out] const BYTE        **ppBlob,
  [out] ULONG             *pcbBlob
);

Parameters

[in] cv

A metadata token that represents the custom attribute to be retrieved.

[out] ptkObj

A metadata token representing the object that the custom attribute modifies. This value can be any type of metadata token except mdCustomAttribute. See Metadata Tokens for more information about the token types.

[out] ptkType

An mdMethodDef or mdMemberRef metadata token representing the Type of the returned custom attribute.

[out] ppBlob

A pointer to an array of data that is the value of the custom attribute.

[out] pcbBlob

The size in bytes of the data returned in const.

Return value

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

Remarks

A custom attribute is stored as an array of data, the format of which is understood by the metadata engine.

Requirements

Requirement Value
Target Platform Windows
Header rometadataapi.h

See also

IMetaDataImport