IRunnableTask interface (shobjidl_core.h)
A free-threaded interface that can be exposed by an object to allow operations to be performed on a background thread. For example, if the IExtractImage::GetLocation method returns E_PENDING, the calling application is permitted to extract the image on a background thread.
Inheritance
The IRunnableTask interface inherits from the IUnknown interface. IRunnableTask also has these types of members:
Methods
The IRunnableTask interface has these methods.
IRunnableTask::IsRunning Requests information on the state of a task, such as thumbnail extraction. |
IRunnableTask::Kill Requests that a task be stopped. |
IRunnableTask::Resume Requests that a task resume. |
IRunnableTask::Run Requests that a task begin. |
IRunnableTask::Suspend Requests that a task be suspended. |
Remarks
Implement IRunnableTask if your namespace extension is free-threaded, and you want to allow a task such as icon extraction to be managed by a scheduler. Only the Run and IsRunning methods must be implemented. If you do not want to implement Kill, Resume, and Suspend, simply have them return E_NOTIMPL.
If you are using IRunnableTask to extract an image on a background thread, that is, if the object exposes IExtractImage, then Run is not necessary, as the system will use IExtractImage::Extract to manage the task. The other methods (Kill, Resume, and Suspend) are optional in this case, but will be used by the system if they are implemented.
You do not call this interface directly. IRunnableTask is used by the operating system only when it has confirmed that your application is aware of this interface.
IRunnableTask implements IUnknown as well as the five listed methods.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |