IActionCollection::Create method (taskschd.h)
Creates and adds a new action to the collection.
Syntax
HRESULT Create(
[in] TASK_ACTION_TYPE type,
[out] IAction **ppAction
);
Parameters
[in] type
This parameter is set to one of the following TASK_ACTION_TYPE enumeration constants.
[out] ppAction
An IAction interface that represents the new action.
Pass in a reference to a NULL IAction interface pointer. Referencing a non-NULL pointer can cause a memory leak because the pointer will be overwritten.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
You cannot add more than 32 actions to the collection.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | taskschd.h |
Library | Taskschd.lib |
DLL | Taskschd.dll |