Gets the custom attribute, given its name and owner.
HRESULT GetCustomAttributeByName ( [in] mdToken tkObj, [in] LPCWSTR szName, [out] const void **ppData, [out] ULONG *pcbData );
[in] A metadata token representing the object that owns the custom attribute.
[in] The name of the custom attribute.
[out] A pointer to an array of data that is the value of the custom attribute.
[out] The size in bytes of the data returned in *
It is legal to define multiple custom attributes for the same owner; they may even have the same name. However,
GetCustomAttributeByName returns only one instance. (
GetCustomAttributeByName returns the first instance that it encounters.) To find all instances of a custom attribute, call the IMetaDataImport::EnumCustomAttributes method.
Platforms: See System Requirements.
Library: Included as a resource in MsCorEE.dll
.NET Framework Versions: Available since 1.0