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. (May be omitted if there is only one task step to be executed)

Return Values

Returns the function's execution result. Returns one of the Result values listed below.
Value Description
ResultSuccess Deletion successful.
ResultInvalidTaskId The task ID pointer is NULL or a zero-length string.
ResultTaskNotExist The specified task ID was not found. Confirm whether it is registered yet.
ResultCantUnregisterTask The task cannot be deleted because of its state. (For example, it may currently be running or have already been scheduled.) Call the Task class's Cancel function and then try again to delete the task.
ResultIpcNotSessionInitialized Either the session is not initialized or there are incompatible permissions. This Result is returned if this function is called before the Initialize or InitializePrivileged function. Always call the Initialize or InitializePrivileged function first when you use the BOSS library.
A value other than the above. Unexpected error (see boss_Result.h for error details).

Description

Unregisters a task previously registered to the library. 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 the Task class's Cancel function to prevent the next task from running, and finally unregister the task.

Revision History

2010/09/16
Initial version.

CONFIDENTIAL