IHostTaskManager Interface
Provides methods that allow the common language runtime (CLR) to work with tasks through the host instead of using the standard operating system threading or fiber functions.
interface IHostTaskManager : IUnknown
{
HRESULT GetCurrentTask (
[out] IHostTask **pTask
);
HRESULT CreateTask (
[in] DWORD dwStackSize,
[in] LPTHREAD_START_ROUTINE pStartAddress,
[in] PVOID pParameter,
[out] IHostTask **ppTask
);
HRESULT Sleep (
[in] DWORD dwMilliseconds,
[in] DWORD option
);
HRESULT SwitchToTask (
[in] DWORD option
);
HRESULT SetUILocale (
[in] LCID lcid
);
HRESULT SetLocale (
[in] LCID lcid
);
HRESULT CallNeedsHostHook (
[in] SIZE_T target,
[out] BOOL *pbCallNeedsHostHook
);
HRESULT LeaveRuntime (
[in] SIZE_T target
);
HRESULT EnterRuntime ();
HRESULT ReverseLeaveRuntime ();
HRESULT ReverseEnterRuntime ();
HRESULT BeginDelayAbort ();
HRESULT EndDelayAbort ();
HRESULT BeginThreadAffinity ();
HRESULT EndThreadAffinity ();
HRESULT SetStackGuarantee (
[in] ULONG guarantee
);
HRESULT GetStackGuarantee (
[out] ULONG *pGuarantee
);
HRESULT SetCLRTaskManager (
[in] ICLRTaskManager *ppManager
);
}
Methods
Method | Description |
---|---|
Notifies the host that managed code is entering a period in which the current task must not be aborted. |
|
Notifies the host that managed code is entering a period in which the current task must not be moved to another operating system thread. |
|
Enables the host to specify whether the common language runtime can inline the specified call to an unmanaged function. |
|
Requests that the host create a new task. |
|
Notifies the host that managed code is exiting the period in which the current task must not be aborted, following an earlier call to BeginDelayAbort. |
|
Notifies the host that managed code is exiting the period in which the current task must not be moved to another operating system thread, following an earlier call to BeginThreadAffinity. |
|
Notifies the host that a call to an unmanaged method, such as a platform invoke method, is returning execution control to the CLR. |
|
Gets an interface pointer to the task that is currently executing on the operating system thread from which this call is made. |
|
Gets the amount of stack space that is guaranteed to be available after a stack operation completes, but before the closing of a process. |
|
Notifies the host that managed code is about to make a call to an unmanaged function. |
|
Notifies the host that a call is being made into the common language runtime (CLR) from unmanaged code. |
|
Notifies the host that control is leaving the CLR and entering an unmanaged function that was, in turn, called from managed code. |
|
Provides the host with an interface pointer to an ICLRTaskManager Interface instance implemented by the CLR. |
|
Notifies the host that the CLR has changed the locale on the current task. |
|
Reserved for internal use only. |
|
Notifies the host that the user interface locale has been changed on the current task. |
|
Notifies the host that the current task is going to sleep. |
|
Notifies the host that it should switch out the current task. |
Remarks
IHostTaskManager allows the CLR to create and manage tasks, to provide hooks for the host to take action when control transfers from managed to unmanaged code and vice versa, and to specify certain actions the host can and cannot take during code execution.
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
ICLRTaskManager Interface
IHostTask Interface