Windows Dev Center

IRegisteredTaskCollection::Item property

Gets the specified registered task from the collection.

This property is read-only.

Syntax


HRESULT get_Item(
  [in]  VARIANT         Index,
  [out] IRegisteredTask **ppRegisteredTask
);

Property value

An IRegisteredTask interface that contains the requested context.

You can pass in a reference to a NULL IRegisteredTask interface pointer. Referencing a non-NULL pointer can cause a memory leak because the pointer will be overwritten. You can also pass in a VARIANT string that contains the name of the task to get.

Error codes

NameMeaning
S_OK

The property value was successfully retrieved.

Remarks

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

Task Scheduler
IRegisteredTaskCollection

 

 

Community Additions

ADD
Show:
© 2015 Microsoft