3.2.4.4.1.52 IVolumeClient::AbortTask (Opnum 69)

The AbortTask method aborts a task running on the server.

 HRESULT AbortTask(
   [in] LdmObjectId id
 );

id: Specifies the OID of the task to be aborted.

Return Values: The method MUST return 0 or a nonerror HRESULT on success, or an implementation-specific nonzero error code on failure (as specified in [MS-ERREF]; see also section 2.2.1 for HRESULT values predefined by the Disk Management Remote Protocol).

Upon receiving this message, the server MUST validate parameters:

  • Verify that the task specified by id is in the list of tasks currently running on the server.

If parameter validation fails, the server MUST fail the operation immediately, returning an appropriate error as its response to the client.

Otherwise, the server MUST process the message as follows:

  1. Cancel the task specified by id. The server MUST attempt to stop all activity related to the task.

  2. Wait for the cancellation to succeed or fail.

  3. Return a response to the client containing the status of the operation.

  4. If successful, send task completion notification and delete the task object from the list of tasks currently running on the server.