次の方法で共有


3.2.5.8 NetPrintJobDelete Command

The Remote Administration Protocol server MUST process the NetPrintJobDeleteRequest as follows:

  1. The server MUST validate that the incoming ParamDesc field of the Remote Administration Protocol request contains the ASCII string "W"; if it does not, the server SHOULD format a Remote Administration Protocol response with the Win32ErrorCode set to ERROR_INVALID_PARAMETER (0x0057), and then return the response to the client.<79>

  2. The server MUST call RpcOpenPrinter with the following parameters:

    Parameter

    Value

    pPrinterName

    The local machine name

    pDatatype

    "RAW"

    pDevModeContainer

    NULL

    AccessRequired

    JOB_ACCESS_ADMINISTER (section 2.2.3.1)

    If this call succeeds, the server MUST call RpcSetJob with the following parameters:

    Parameter

    Value

    hPrinter

    A handle to the printer returned from RpcOpenPrinter

    JobId

    The value of NetPrintJobDeleteRequest.JobID

    pJobContainer

    NULL

    Command

    JOB_CONTROL_DELETE

  3. If an error occurs during the response processing, the Remote Administration Protocol server MUST fill in the Win32ErrorCode value in the Remote Administration Protocol response message with the Win32 error code corresponding to the error. Otherwise, the Remote Administration Protocol server MUST fill in the Win32ErrorCode value in the Remote Administration Protocol response message with ERROR_SUCCESS (0x0000).