IShellTaskScheduler2::MoveTask method

[IShellTaskScheduler2 is available in Windows XP. It might be altered or unavailable in subsequent versions.]

Changes the priority and placement in the task queue for a specified task.

Syntax


HRESULT MoveTask(
  [in] REFTASKOWNERID rtoid,
  [in] DWORD_PTR      lParam,
  [in] DWORD          dwPriority,
  [in] DWORD          grfFlags
);

Parameters

rtoid [in]

Type: REFTASKOWNERID

A GUID identifying the owner of the task(s).

lParam [in]

Type: DWORD_PTR

A pointer to a user-defined DWORD value allowing the task to be identified within the tasks owned by rtoid.

dwPriority [in]

Type: DWORD

One of the following values assigning the task's priority. Response to this priority depends on the cooperation of the other tasks being executed. New tasks are inserted in the queue in priority order. If a task of a low priority is currently under execution when a higher priority task is added, the scheduler attempts to suspend the task under execution. That lower priority task is resumed when the higher priority task(s) are completed.

ITSAT_DEFAULT_PRIORITY

Accept the default priority assigned to the task by the scheduler.

ITSAT_MAX_PRIORITY

High priority.

ITSAT_MIN_PRIORITY

Low priority.

grfFlags [in]

Type: DWORD

One of the following values indicating the placement of the task in the queue with respect to other tasks of its priority level.

ITSSFLAG_TASK_PLACEINFRONT

Place the task in front of other tasks at the same priority level.

ITSSFLAG_TASK_PLACEINBACK

Place the task behind other tasks at the same priority level.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

DLL

Shell32.dll (version 5.0 or later)

 

 

Show: