IHostTask Interface
TOC
Collapse the table of content
Expand the table of content

IHostTask Interface

Provides methods that allow the common language runtime (CLR) to communicate with the host to manage tasks.

interface IHostTask : IUnknown {
    HRESULT Alert ();
    HRESULT GetPriority (
        [out] int *pPriority
    );
    HRESULT Join (
        [in] DWORD dwMilliseconds,
        [in] DWORD option
    ); 
    HRESULT SetCLRTask (
        [in] ICLRTask *pCLRTask
    );
    HRESULT SetPriority (
        [in] int newPriority
    ); 
    HRESULT Start ();
};

Method

Description

IHostTask::Alert Method

Requests that the host wake the task represented by the current IHostTask instance, so the task can be aborted.

IHostTask::GetPriority Method

Gets the thread priority level of the task represented by the current IHostTask instance.

IHostTask::Join Method

Blocks the calling task until the task represented by the current IHostTask instance completes, the specified time interval elapses, or IHostTask::Alert is called.

IHostTask::SetCLRTask Method

Associates an ICLRTask Interface instance with the current IHostTask instance.

IHostTask::SetPriority Method

Requests that the host adjust the thread priority level for the task represented by the current IHostTask instance.

IHostTask::Start Method

Requests that the host move the task represented by the current IHostTask instance from a suspended state to a live state, in which code can be executed.

The CLR calls methods defined by IHostTask to start a task, set its thread priority level, and so on.

Platforms: See .NET Framework System Requirements.

Header: MSCorEE.idl

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0

Community Additions

ADD
Show:
© 2016 Microsoft