Returns an empty task definition object to be filled in with settings and properties and then registered using the ITaskFolder::RegisterTaskDefinition method.
HRESULT NewTask( DWORD flags, ITaskDefinition **ppDefinition );
This parameter is reserved for future use and must be set to 0.
The task definition that specifies all the information required to create a new task.
Pass in a reference to a NULL ITaskDefinition interface pointer. Referencing a non-NULL pointer can cause a memory leak because the pointer will be overwritten.
The returned ITaskDefinition pointer must be released after it is used.
This method can return one of these values.
||The method returned successfully without error.|
||NULL was passed in to the ppDefinition parameter. Pass in a reference to a NULL ITaskDefinition interface pointer.|
||A nonzero value was passed into the flags parameter.|
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|