Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All RpcResetPrinter (Opnum 52)

RpcResetPrinter resets the data type and device mode (For more information, see [DEVMODE]) values to use for printing documents submitted by the RpcStartDocPrinter (section method.

 DWORD RpcResetPrinter(
   [in] PRINTER_HANDLE hPrinter,
   [in, string, unique] wchar_t* pDatatype,
   [in] DEVMODE_CONTAINER* pDevModeContainer

hPrinter: A handle to a printer object that was opened by RpcAddPrinter (section, RpcAddPrinterEx (section, RpcOpenPrinter (section, or RpcOpenPrinterEx (section

pDatatype: A parameter specified in Datatype Name Parameters (section

pDevModeContainer: A parameter specified in DEVMODE_CONTAINER Parameters.

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 parameters as follows:

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

  • Perform the validation steps specified in Datatype Name Parameters.

  • Perform the validation steps specified in DEVMODE_CONTAINER Parameters.

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 the default data type that is associated with the context for hPrinter.

  • Update the default DEVMODE structure that is associated with the context for hPrinter.

  • Return the status of the operation.

© 2015 Microsoft