IMetaDataEmit::DefineField Method
Creates a definition for a field with the specified metadata signature, and gets a token to that field definition.
HRESULT DefineField (
[in] mdTypeDef td,
[in] LPCWSTR szName,
[in] DWORD dwFieldFlags,
[in] PCCOR_SIGNATURE pvSigBlob,
[in] ULONG cbSigBlob,
[in] DWORD dwCPlusTypeFlag,
[in] void const *pValue,
[in] ULONG cchValue,
[out] mdFieldDef *pmd
);
Parameters
td
[in] The mdTypeDef token for the enclosing class or interface.szName
[in] The field name in Unicode.dwFieldFlags
[in] The field attributes.pvSigBlob
[in] The field signature as a BLOB.cbSigBlob
[in] The count of bytes in pvSigBlob.dwCPlusTypeFlage
[in] The ELEMENT_TYPE_* for the constant value.pValue
[in] The constant value for the field.cchValue
[in] The size in (Unicode) characters of pValue.pmd
[out] The mdFieldDef token assigned.
Requirements
Platforms: See .NET Framework System Requirements.
Header: Cor.h
Library: Used as a resource in MSCorEE.dll
.NET Framework Versions: 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0