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.
Syntax
HRESULT DefineCustomAttribute (
[in] mdToken tkObj,
[in] mdToken tkType,
[in] void const *pCustomAttribute,
[in] ULONG cbCustomAttribute,
[out] mdCustomAttribute *pcv
);
Parameters
tkObj
[in] The token for the owner item.
tkType
[in] The token that identifies the custom attribute.
pCustomAttribute
[in] A pointer to the custom attribute.
cbCustomAttribute
[in] The count of bytes in pCustomAttribute
.
pcv
[out] The mdCustomAttribute
token assigned.
Requirements
Platforms: See System Requirements.
Header: Cor.h
Library: Used as a resource in MSCorEE.dll
.NET Framework Versions: Available since 1.0
See also
Samarbeid med oss på GitHub
Du finner kilden for dette innholdet på GitHub. Der du også kan opprette og se gjennom problemer og pull-forespørsler. Hvis du vil ha mer informasjon, kan du se vår bidragsyterveiledning.