Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Create a new task subfolder under a given parent folder.
NS_ERROR_FILE_NOT_FOUND if the parent folder does not exist.
NS_ERROR_FILE_ALREADY_EXISTS if the subfolder already exists.
Immediate parent for the new folder, starting with "".
Name of the new folder to create.
Delete a folder.
NS_ERROR_FILE_NOT_FOUND if the parent folder does not exist.
NS_ERROR_FILE_DIR_NOT_EMPTY if the folder was not empty.
Immediate parent of the folder to delete, starting with "".
Name of the folder to delete.
Get the registration information for a task.
NS_ERROR_FILE_NOT_FOUND if the folder or task do not exist.
Registration information for the task, as XML text.
Full name of the folder containing the task, starting with "".
Name of the task to read.
Register (create) a task from an XML definition. The task will be created so that it only runs as the current user (TASK_LOGON_INTERACTIVE_TOKEN).
NS_ERROR_FILE_NOT_FOUND if the folder does not exist.
NS_ERROR_FILE_ALREADY_EXISTS if the task already existed and aUpdateExisting is false.
Full name of the folder in which to create the task, starting with "".
Name of the task.
XML definition of the task. This is passed directly to Task Scheduler, see the schema at https://docs.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-schema
Whether to update an existing task with the same name, default false.
Validate the XML task definition with Task Scheduler without creating a task, for testing. Doesn't throw if only the final ITaskFolder::RegisterTask() fails.
HRESULT from ITaskFolder::RegisterTask() Success should be S_OK (0). XML validation failure could be one of SCHED_E_UNEXPECTED_NODE, SCHED_E_NAMESPACE, SCHED_E_INVALIDVALUE, SCHED_E_MISSINGNODE, SCHED_E_MALFORMEDXML, but there may be others.
Definition to validate.
Generated using TypeDoc
An interface for Windows Task Scheduler 2.0. Documentation for the underlying APIs can be found at https://docs.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page