IMetaDataImport::GetCustomAttributeProps Method

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

HRESULT GetCustomAttributeProps (
   [in]            mdCustomAttribute   cv,
   [out, optional] mdToken             *ptkObj,
   [out, optional] mdToken             *ptkType,
   [out, optional] void const          **ppBlob,
   [out, optional] ULONG               *pcbSize
);

Parameters

  • cv
    [in] A metadata token that represents the custom attribute to be retrieved.

  • ptkObj
    [out, optional] 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.

  • ptkType
    [out, optional] An mdMethodDef or mdMemberRef metadata token representing the Type of the returned custom attribute.

  • ppBlob
    [out, optional] A pointer to an array of data that is the value of the custom attribute.

  • pcbSize
    [out, optional] The size in bytes of the data returned in *ppBlob.

Remarks

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

Requirements

Platforms: See .NET Framework System Requirements.

Header: Cor.h

Library: Included as a resource in MsCorEE.dll

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

See Also

Reference

IMetaDataImport Interface

IMetaDataImport2 Interface