IMetaDataEmit::DefineProperty Method
Creates a property definition for the specified type, with the specified get and set method accessors, and gets a token to that property definition.
HRESULT DefineProperty (
[in] mdTypeDef td,
[in] LPCWSTR szProperty,
[in] DWORD dwPropFlags,
[in] PCCOR_SIGNATURE pvSig,
[in] ULONG cbSig,
[in] DWORD dwCPlusTypeFlag,
[in] void const *pValue,
[in] ULONG cchValue,
[in] mdMethodDef mdSetter,
[in] mdMethodDef mdGetter,
[in] mdMethodDef rmdOtherMethods[],
[out] mdProperty *pmdProp
);
Parameters
Parameter | Description |
---|---|
td |
[in] The token for class or interface on which the property is being defined. |
szProperty |
[in] The name of the property. |
dwPropFlags |
[in] The property flags. |
pvSig |
[in] The property signature. |
cbSig |
[in] The count of bytes in pvSig. |
dwCPlusTypeFlag |
[in] The type of the property's default value. |
pValue |
[in] The default value for the property. |
cchValue |
[in] The count of (Unicode) characters in pValue. |
mdSetter |
[in] The method that sets the property value. |
mdGetter |
[in] The method that gets the property value. |
rmdOtherMethods[] |
[in] An array of other methods associated with the property. Terminate the array with an mdTokenNil. |
pmdProp |
[out] The mdProperty 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