共用方式為


ICorDebugController::Terminate 方法

使用指定的結束代碼終止進程。

注意

此方法是 Win32 TerminateProcess 函式的包裝函式。 因此, Terminate 使用結束代碼的方式與 Win32 TerminateProcess 函式使用它的方式相同。

語法

HRESULT Terminate (
    [in] UINT exitCode
);

參數

exitCode [in]為結束代碼的數值。 有效的數值定義於Winbase.h中。

備註

如果呼叫時 Terminate 停止進程,應該使用 ICorDebugController::Continue 方法繼續進程,讓調試程式透過 ICorDebugManagedCallback::ExitProcessICorDebugManagedCallback::ExitAppDomain 回呼接收終止的確認。

注意

這個方法不是由應用程式域實作。 也就是說,它不會在 層級實作 AppDomain

需求

平台:請參閱系統需求

標頭:CorDebug.idl、CorDebug.h

程式庫:CorGuids.lib

.NET Framework 版本: 自 1.0 起提供

另請參閱