nn::boss::UnregisterTask Function

Syntax

+nn::Result UnregisterTask(
     Task * pTask,
     u8 taskStep = DEFAULT_STEP_ID
);

Arguments

Name Description
in pTask Specifies a registered task.
in taskStep Specifies a task step ID. (Can be omitted if there is only one task execution step)
Note: This parameter is for a feature extension, and is currently not supported. Do not specify it.

Return Values

Returns the function's execution result. Returns one of the Result values listed below.
Value Description
Result::IsSuccess Deletion successful.
ResultInvalidTaskId The pTask argument is NULL.
Alternatively, the pTask argument is uninitialized, or the pointer of the task ID specified by pTask is NULL or an empty string.
ResultTaskNotExist The specified task ID was not found. Confirm whether it is registered yet.
ResultAppNotExist The specified task ID was not found.
(NADL task) This function returns this Result when the BOSS storage has not yet been registered.
(Other than NADL task) This function returns this Result when the task of the application that called it has never been registered.
ResultCantUnregisterTask The task cannot be deleted because of its state. (For example, it may currently be running or have already been scheduled.) Call nn::boss::Task::Cancel and then try again to delete the task.
ResultIpcNotSessionInitialized The session has not been initialized.
This Result is returned if this function is called before the Initialize function. Always call the Initialize function before using the BOSS library.
A value other than the above. Unexpected error (see boss_Result.h for error details).

Description

Deletes a registered task.

Although you can unregister a task that is currently running or is waiting to run, you will be unable to check that task's execution results. If you want to check the task's execution results, do so after the task has finished running, then call nn::boss::Task::Cancel to prevent the next task from running, and unregister the task.

Revision History

2010/09/16
Initial version.

CONFIDENTIAL