IRunnableTask interface

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.

Members

The IRunnableTask interface inherits from the IUnknown interface. IRunnableTask also has these types of members:

Methods

The IRunnableTask interface has these methods.

MethodDescription
IsRunning

Requests information on the state of a task, such as thumbnail extraction.

Kill

Requests that a task be stopped.

Resume

Requests that a task resume.

Run

Requests that a task begin.

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.

Note  Windows Vista and later. Prior to Windows Vista this interface was declared in Shlobj.h.
 

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll (version 5.0 or later)

 

 

Show: