Freigeben über


EPolicyAction Enumeration

Describes the policy actions the host can set for operations described by EClrOperation and failures described by EClrFailure.

typedef enum {
    eNoAction,
    eThrowException,
    eAbortThread,
    eRudeAbortThread,
    eUnloadAppDomain,
    eRudeUnloadAppDomain,
    eExitProcess,
    eFastExitProcess,
    eRudeExitProcess,
    eDisableRuntime
} EPolicyAction;

Members

Member

Description

eAbortThread

Specifies that the common language runtime (CLR) should abort the thread gracefully. A graceful abort includes attempts to run all finally blocks, any catch blocks related to thread aborts, and finalizers.

eDisableRuntime

Specifies that the CLR should enter a disabled state. No further managed code can be executed in the affected process, and threads are blocked from entering the CLR.

eExitProcess

Specifies that the CLR should attempt a graceful exit of the process, including running finalizers and performing cleanup and logging operations.

eFastExitProcess

Specifies that the CLR should exit the process immediately, without running finalizers or performing cleanup and logging operations. Nowever, notification is sent to the debugger.

eNoAction

Specifies that no action should be taken.

eRudeAbortThread

Specifies that the CLR should perform a rude thread abort. Only those catch and finally blocks marked with MustRunInClientContextAttribute are executed.

eRudeExitProcess

Specifies that the CLR should exit the process without running finalizers or logging operations.

eRudeUnloadAppDomain

Specifies that the CLR should perform a rude unload of the AppDomain. Only finalizers marked with MustRunInClientContextAttribute are executed. Similarly, all threads with this AppDomain in their stack receive a ThreadAbortException, but only those catch and finally blocks marked with MustRunInClientContextAttribute are executed.

eThrowException

Specifies that an exception appropriate to the condition, such as out-of-memory, buffer overflow, and so forth, should be thrown.

eUnloadAppDomain

Specifies that the AppDomain should be unloaded. The CLR attempts to run finalizers.

Remarks

The host sets policy actions by calling methods of the ICLRPolicyManager interface. For information about rude and graceful aborts, see the EClrOperation enumeration.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: MSCorEE.idl

Library: MSCorEE.dll

.NET Framework Version: 2.0

See Also

Concepts

EClrFailure Enumeration

ICLRPolicyManager Interface

IHostPolicyManager Interface

Hosting Enumerations