IMetaDataImport::FindTypeDefByName method (rometadataapi.h)

Gets a pointer to the TypeDef metadata token for the Type with the specified name.

Syntax

HRESULT FindTypeDefByName(
  [in]          LPCWSTR   szTypeDef,
  [in]          mdToken   tkEnclosingClass,
  [out, retval] mdTypeDef *ptkTypeDef
);

Parameters

[in] szTypeDef

The name of the type for which to get the TypeDef token.

[in] tkEnclosingClass

A TypeDef or TypeRef token representing the enclosing class. If the type to find is not a nested class, set this value to NULL.

[out, retval] ptkTypeDef

A pointer to the matching TypeDef token.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Target Platform Windows
Header rometadataapi.h

See also

IMetaDataImport