RpcStartDocPrinter notifies the print server that a document is being spooled for printing.

 DWORD RpcStartDocPrinter(
   [in] PRINTER_HANDLE hPrinter,
   [in] DOC_INFO_CONTAINER* pDocInfoContainer,
   [out] DWORD* pJobId
 );

hPrinter: A handle to a printer object or port object that was opened by RpcAddPrinter (section 3.1.4.2.3), RpcAddPrinterEx (section 3.1.4.2.15), RpcOpenPrinter (section 3.1.4.2.2), or RpcOpenPrinterEx (section 3.1.4.2.14). The printer handle MUST NOT be in use for printing another document at the time of this call.

pDocInfoContainer: A parameter specified in DOC_INFO_CONTAINER Parameters (section 3.1.4.1.8.2).

pJobId: A pointer to a variable that receives a nonzero print job identifier. The job MUST be created with an identifier that is unique for this printer.

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

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

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: