IRunningTaskCollection::Item property

Gets the specified task from the collection.

This property is read-only.

Syntax


HRESULT get_Item(
  [in]  VARIANT      index,
  [out] IRunningTask **ppJob
);

Property value

An IRunningTask interface of the specified task.

Pass in a reference to a NULL IRunningTask interface pointer. Referencing a non-NULL pointer can cause a memory leak because the pointer will be overwritten.

Error codes

NameMeaning
S_OK

The property value was successfully retrieved.

Remarks

IRunningTaskCollection::get_Item returns E_INVALIDARG and E_TYPE_MISMATCH instead of E_INVALID_VARIANT when an invalid argument is specified.

Collections are 1-based. That is, the index for the first item in the collection is 1.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

IRunningTaskCollection
IRunningTaskCollection
IRunningTask

 

 

Show: