Delen via


IMetaDataEmit::DefineTypeDef Method

Creates a type definition for a common language runtime type, and gets a metadata token to that type definition.

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

Parameters

  • 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 specifying the interfaces that this class or interface implements.

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

See Also

Reference

IMetaDataEmit Interface

IMetaDataEmit2 Interface