Export (0) Print
Expand All RpcStartPagePrinter (Opnum 18)

RpcStartPagePrinter notifies the spooler that a page is about to be printed on the specified printer.

DWORD RpcStartPagePrinter(
  [in] PRINTER_HANDLE hPrinter

Return Values: This method MUST return zero (ERROR_SUCCESS) to indicate successful completion or a nonzero Windows error code to indicate failure, as specified in [MS-ERREF].

Upon receiving this message, the server MUST validate the following:

  • Perform the validation steps that are specified in PRINTER_HANDLE Parameters (section This method SHOULD assume that the handle to the printer or port object can be used without further access checks.

  • Verify that a job has been associated with hPrinter using RpcStartDocPrinter, and if that verification fails, return ERROR_SPL_NO_STARTDOC, as specified in [MS-ERREF].

  • Verify that printing of the job has not been canceled, and if that verification fails, return ERROR_PRINT_CANCELLED, as specified in [MS-ERREF].

If parameter validation fails, the server MUST fail the operation immediately and return a nonzero error response to the client. Otherwise, the server MUST process the message and compose a response to the client as follows:

  • Update print job statistics to reflect incremented page count.

  • Return the status of the operation.

For each page of a print job, a print client SHOULD perform the following sequence of actions:

The print server SHOULD treat the calls to RpcStartPagePrinter and RpcEndPagePrinter as informational only, with the only visible result being updating the page count of the print job. The server MUST NOT make any assumptions or perform any validation steps regarding the relative order or frequency of calls to these three methods.

© 2015 Microsoft