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
Parameter | Description |
---|---|
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: Windows 2000, Windows XP, Windows Server 2003 family
Header: Cor.h
Library: Used as a resource in Mscoree.dll
.NET Framework Version: 2.0, 1.1, 1.0