Partager via


IMetaDataEmit::DefineNestedType Method

Creates the metadata signature of a type definition, returns an mdTypeDef token for that type, and specifies that the defined type is a member of the type referenced by the tdEncloser parameter.

HRESULT DefineNestedType ( 
    [in]  LPCWSTR     szTypeDef,
    [in]  DWORD       dwTypeDefFlags, 
    [in]  mdToken     tkExtends, 
    [in]  mdToken     rtkImplements[], 
    [in]  mdTypeDef   tdEncloser, 
    [out] mdTypeDef   *ptd
);

Parameters

Parameter Description

szTypeDef

[in] The name of the type in Unicode.

dwTypeDefFlags

[in] TypeDef attributes.

tkExtends

[in] The token of the base class.

rtkImplements[]

[in] An array of tokens that specify the interfaces that this class or interface implements.

tdEncloser

[in] The token of the enclosing type.

ptd

[out] The mdTypeDef 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

See Also

Reference

IMetaDataEmit Interface
IMetaDataEmit2 Interface