ICorDebugType2:: GetTypeID 方法ICorDebugType2::GetTypeID Method

取得此類型的 COR_TYPEIDGets a COR_TYPEID for this type.

語法Syntax

HRESULT GetTypeID(  
    ([out] COR_TYPEID *id  
);  

參數Parameters

id
擴展這個 ICorDebugType 之 COR_TYPEID 的指標。[out] A pointer to the COR_TYPEID for this ICorDebugType.

傳回值Return Value

如果成功,傳回值為 S_OK,如果失敗,則傳回失敗 HRESULT 程式碼。The return value is S_OK on success, or a failure HRESULT code on failure. 這些 HRESULT 代碼包含下列各項:The HRESULT codes include the following:

傳回碼Return code 描述Description
S_OK 方法成功。Method succeeded. 方法已取出有效的 COR_TYPEIDThe method has retrieved a valid COR_TYPEID.
CORDBG_E_CLASS_NOT_LOADED 尚未載入類型。The type has not been loaded.
CORDBG_E_UNSUPPORTED 不支援這種類型。The type is not supported.

備註Remarks

這個方法會提供 ICorDebugType 的對應,其代表可能或可能尚未載入執行時間的型別,以做為識別載入執行時間之型別的不透明控制碼的 COR_TYPEIDThis method provides a mapping from the ICorDebugType, which represents a type that may or may not have been loaded into the runtime, to a COR_TYPEID, which serves as an opaque handle that identifies a type loaded into the runtime.

當 ICorDebugType 表示的類型尚未載入時,這個方法會傳回 CORDBG_E_CLASS_NOT_LOADEDWhen the type that the ICorDebugType represents has not yet been loaded, this method returns CORDBG_E_CLASS_NOT_LOADED. 如果類型不受支援,則會傳回 CORDBG_E_UNSUPPORTEDIf the type is not supported, it returns CORDBG_E_UNSUPPORTED.

需求Requirements

平台: 請參閱 系統需求Platforms: See System Requirements.

標頭: CorDebug.idl、CorDebug.hHeader: CorDebug.idl, CorDebug.h

程式庫: CorGuids.libLibrary: CorGuids.lib

.NET Framework 版本:自 4.6.2 起可用Available since 4.6.2.NET Framework Versions: 自 4.6.2 起可用Available since 4.6.2

另請參閱See also