Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DefineCustomAttribute Method

IMetaDataEmit::DefineCustomAttribute Method

Creates a definition for a custom attribute with the specified metadata signature, to be attached to the specified object, and gets a token to that custom attribute definition.

HRESULT DefineCustomAttribute ( 
    [in]  mdToken     tkObj, 
    [in]  mdToken     tkType, 
    [in]  void const  *pCustomAttribute, 
    [in]  ULONG       cbCustomAttribute, 
    [out] mdCustomAttribute *pcv 


[in] The token for the owner item.


[in] The token that identifies the custom attribute.


[in] A pointer to the custom attribute.


[in] The count of bytes in pCustomAttribute.


[out] The mdCustomAttribute token assigned.

Platforms: See .NET Framework System Requirements.

Header: Cor.h

Library: Used as a resource in MSCorEE.dll

.NET Framework Versions: 4.6, 4.5.2, 4.5.1, 4.5, 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

© 2015 Microsoft