CreateDebuggingInterfaceFromVersion3 函式
接受從 CreateVersionStringFromModule 函式傳回的通用語言執行階段 (CLR) 版本字串,並傳回對應的偵錯工具介面 (通常是 ICorDebug)。
語法
HRESULT CreateDebuggingInterfaceFromVersion3 (
[in] int iDebuggerVersion,
[in] LPCWSTR szDebuggeeVersion,
[in] LPCWSTR szApplicationGroupId,
[in] ICLRDebuggingLibraryProvider3* pLibraryProvider,
[out] IUnknown** ppCordb,
);
參數
iDebuggerVersion
[in] 偵錯工具預期的介面版本。
szDebuggeeVersion
[in] 目標偵錯項目中的 CLR 版本字串,由 CreateVersionStringFromModule 函式傳回。
szApplicationGroupId
[in] 字串,代表 macOS 中所執行沙箱化處理序的應用程式群組識別碼。 如果程序未在 macOS 或其他平台上的沙箱中執行,則傳遞 Null。
pLibraryProvider
[in] 用於尋找 DBI 和 DAC 的回撥介面執行個體。 請參閱 ICLRDebuggingLibraryProvider3 介面。
ppCordb
[out] COM 物件 (IUnknown
) 指標的指標。 這個物件會轉換成 ICorDebug 物件再傳回。
傳回值
S_OK
ppCordb
會參考實作 ICorDebug 介面 的有效物件。
E_INVALIDARG
szDebuggeeVersion
或 ppCordb
為 null。
CORDBG_E_DEBUG_COMPONENT_MISSING
找不到 CLR 偵錯所需的元件。 在目標 CoreCLR.dll 所在的相同目錄中找不到 mscordbi.dll 或 mscordaccore.dll。
CORDBG_E_INCOMPATIBLE_PROTOCOL
mscordbi.dll 或 mscordaccore.dll 的版本與目標 CoreCLR.dll 的版本不同。
E_FAIL
(或其他 E_
傳回碼)
無法傳回 ICorDebug 介面。
備註
傳回的介面提供了附加至目標處理序中的 CLR,以及對 CLR 正在執行之 Managed 程式碼進行偵錯的功能。
需求
平台:請參閱 .NET 支援的作業系統。
標題:dbgshim.h
程式庫:dbgshim.dll、libdbgshim.so、libdbgshim.dylib
.NET 版本:自 .NET 6.0 起提供