Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 1.93 KB

imetadataemit-definetyperefbyname-method.md

File metadata and controls

68 lines (49 loc) · 1.93 KB
description title ms.date api_name api_location api_type f1_keywords helpviewer_keywords ms.assetid topic_type
Learn more about: IMetaDataEmit::DefineTypeRefByName Method
IMetaDataEmit::DefineTypeRefByName Method
03/30/2017
IMetaDataEmit.DefineTypeRefByName
mscoree.dll
COM
IMetaDataEmit::DefineTypeRefByName
DefineTypeRefByName method [.NET Framework metadata]
IMetaDataEmit::DefineTypeRefByName method [.NET Framework metadata]
c30a4ce3-2d3e-411a-98df-e62ac4a5dd50
apiref

IMetaDataEmit::DefineTypeRefByName Method

Gets a metadata token for a type that is defined in the specified scope, which is outside the current scope.

Syntax

HRESULT DefineTypeRefByName (
    [in]  mdToken     tkResolutionScope,
    [in]  LPCWSTR     szName,
    [out] mdTypeRef   *ptr
);  

Parameters

tkResolutionScope
[in] The token specifying the resolution scope. The following token types are valid:

  • mdModuleRef, if the type is defined in the same assembly in which the caller is defined.

  • mdAssemblyRef, if the type is defined in an assembly other than the one in which the caller is defined.

  • mdTypeRef, if the type is a nested type.

  • mdModule, if the type is defined in the same module in which the caller is defined.

  • Null, if the type is defined globally.

szName
[in] The name of the target type in Unicode.

ptr
[out] A pointer to the mdTypeRef token that is assigned to the type.

Requirements

Platforms: See System Requirements.

Header: Cor.h

Library: Used as a resource in MSCorEE.dll

.NET Framework Versions: [!INCLUDEnet_current_v10plus]

See also