Share via


ICLRTaskManager Interface

Provides methods that allow the host to request explicitly that the common language runtime (CLR) create a new task, get the currently executing task, and set the geographic language and culture for the task.

interface ICLRTaskManager : IUnknown {
    HRESULT CreateTask (
        [out] ICLRTask **pTask
    );
    HRESULT GetCurrentTask (
        [out] ICLRTask **ppTask
    );
    HRESULT SetUILocale (
        [in] LCID lcid
    );
    HRESULT SetLocale (
              [in] LCID lcid
    );
};

Methods

Method Description

ICLRTaskManager::CreateTask Method

Requests explicitly that the CLR create a new ICLRTask Interface instance.

ICLRTaskManager::GetCurrentTask Method

Gets the ICLRTask Interface instance that represents the task that is currently executing.

ICLRTaskManager::GetCurrentTaskType Method

Gets the type of the task that is currently executing.

ICLRTaskManager::SetLocale Method

Notifies the CLR that the host has modified the locale identifier on the currently executing task.

ICLRTaskManager::SetUILocale Method

Notifies the common language runtime that the host has modified the user interface locale identifier on the currently executing task.

Remarks

Each task that is running in a hosted environment has representations both on the host side (an instance of IHostTask Interface) and on the CLR side (an instance of ICLRTask Interface). Either the host or the CLR can initiate the creation of a task, but the host-side representation must be associated with a corresponding CLR-side representation to ensure successful communication between the host and the CLR regarding the task. The two objects must be created and instantiated before managed code can execute on an operating system thread.

Requirements

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

Header: MSCorEE.idl

Library: Included as a resource in MSCorEE.dll

.NET Framework Version: 2.0

See Also

Reference

ICLRTask Interface
IHostTask Interface
IHostTaskManager Interface

Other Resources

Hosting Interfaces