3.2.5.2.2 NetrJobDel (Opnum 1)

The NetrJobDel method MUST delete a specified range of tasks from the task store. The method is capable of deleting all AT tasks or just a subset of the tasks, as determined by the values of the MinJobId and MaxJobId parameters.

 NET_API_STATUS NetrJobDel(
   [in, string, unique] ATSVC_HANDLE ServerName,
   [in] DWORD MinJobId,
   [in] DWORD MaxJobId
 );

ServerName:  Pointer to a Unicode string that MUST specify the server. The client MUST map this string to an RPC binding handle. The server MUST ignore this parameter. For more information, see [C706] sections 4.3.5 and 5.1.5.2.

MinJobId: MUST specify the low end of the range of tasks to be deleted. This parameter MUST NOT be greater than MaxJobId.

MaxJobId: MUST specify the high end of the range of tasks to be deleted. This parameter MUST NOT be smaller than MinJobId.

Return Values: For more information on return codes, see section 2.3.14, or Win32 Error Codes in [MS-ERREF] section 2.1.

To delete all tasks, specify MinJobId as 0 and MaxJobId as 0xFFFFFFFF.

In response to this request, the server MUST:

  • Return ERROR_ACCESS_DENIED if the caller does not have administrative privileges on the server.

  • Traverse the AT task store and delete each task whose ID is in the range specified by MinJobId through MaxJobId inclusively.

  • Return ERROR_SUCCESS if the call was successful.

  • Return an error if MinJobId is greater than MaxJobId.

  • Return an error if MaxJobId is smaller than MinJobId.

  • Return an error APE_AT_ID_NOT_FOUND (0x00000EDE) if no ID was valid in the specified range.

If any errors are raised during the processing, they are returned. For more information about return codes, see section 2.3.14 and Win32 Error Codes in [MS-ERREF] section 2.1.