Export (0) Print
Expand All

3.1.4 Message Processing Events and Sequencing Rules

The Print System Remote Protocol MUST indicate the following to the RPCruntime specified in [MS-RPCE] section 3.

  • It is to perform a strict NDR data consistency check at target level 6.0.

  • It is to reject a NULL unique or full pointer with non-zero conformant value.

  • Using the strict_context_handle attribute, it is to reject the use of context handles that are created by the methods of a different RPC interface.

The methods that are defined by this protocol are grouped into functional categories, and their syntax and behavior are specified in sections, as shown in the following table.

Functional category

Description

Section

Printer management and discovery

Methods used for discovering and obtaining access to supported printers.

3.1.4.2

Job management

Methods for discovering, defining, and scheduling print jobs.

3.1.4.3

Printer driver management

Methods for discovering and installing printer drivers.

3.1.4.4

Form management

Methods for discovering and configuring printer forms.

3.1.4.5

Printer port management

Methods for discovering and communicating with printer ports.

3.1.4.6

Port monitor management

Methods for discovering and installing port monitor modules.

3.1.4.7

Print processor management

Methods for discovering and manipulating print processor objects.

3.1.4.8

Document printing

Methods for printing documents, pages and data.

3.1.4.9

Notifications

Methods for obtaining notifications of printing events.

3.1.4.10

Monitor modules

Methods specified by executable language monitors.

3.1.4.11

Job named property management

Methods for creating, updating, deleting, and enumerating Job Named Properties (section 3.1.1).<293>

3.1.4.12

Branch office print remote logging

Methods for processing Branch Office Print Remote Log Entries (section 3.1.1).<294>

3.1.4.13

The following table lists all the methods of the Print System Remote Protocol in ascending opnum order.

Methods in RPC Opnum Order

Method Description

RpcEnumPrinters

RpcEnumPrinters enumerates available printers, print servers, domains, or print providers.

Opnum: 0

RpcOpenPrinter

RpcOpenPrinter retrieves a handle for a printer, port, port monitor, print job, or print server.

Opnum: 1

RpcSetJob

RpcSetJob pauses, resumes, cancels, or restarts a print job. It also sets print job parameters, for example, the job priority and the document name.

Opnum: 2

RpcGetJob

RpcGetJob retrieves information about a specified print job.

Opnum: 3

RpcEnumJobs

RpcEnumJobs retrieves information about a specified set of print jobs for a specified printer.

Opnum: 4

RpcAddPrinter

RpcAddPrinter adds a printer to the list of supported printers for a specified server.

Opnum: 5

RpcDeletePrinter

RpcDeletePrinter deletes the specified printer object.

Opnum: 6

RpcSetPrinter

RpcSetPrinter sets the data for a specified printer or sets the state of the specified printer by pausing or resuming printing, or clearing all print jobs.

Opnum: 7

RpcGetPrinter

RpcGetPrinter retrieves information about a specified printer.

Opnum: 8

RpcAddPrinterDriver

RpcAddPrinterDriver installs a printer driver on the print server and links the configuration, data, and printer driver files.

Opnum: 9

RpcEnumPrinterDrivers

RpcEnumPrinterDrivers enumerates the printer drivers installed on a specified print server.

Opnum: 10

RpcGetPrinterDriver

RpcGetPrinterDriver retrieves printer driver data for the specified printer.

Opnum: 11

RpcGetPrinterDriverDirectory

RpcGetPrinterDriverDirectory retrieves the path of the printer driver directory.

Opnum: 12

RpcDeletePrinterDriver

RpcDeletePrinterDriver removes the specified printer driver from the list of supported drivers for a print server.

Opnum: 13

RpcAddPrintProcessor

RpcAddPrintProcessor installs a print processor on the specified server and adds its name to an internal list of supported print processors.

Opnum: 14

RpcEnumPrintProcessors

RpcEnumPrintProcessors enumerates the print processors installed on a specified server.

Opnum: 15

RpcGetPrintProcessorDirectory

RpcGetPrintProcessorDirectory retrieves the path for the print processor on the specified server.

Opnum: 16

RpcStartDocPrinter

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

Opnum: 17

RpcStartPagePrinter

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

Opnum: 18

RpcWritePrinter

RpcWritePrinter sends data to the print spooler.

Opnum: 19

RpcEndPagePrinter

RpcEndPagePrinter notifies the print spooler that the application is at the end of a page in a print job.

Opnum: 20

RpcAbortPrinter

RpcAbortPrinter aborts the currently spooling print document.

Opnum: 21

RpcReadPrinter

RpcReadPrinter retrieves data from the specified printer.

Opnum: 22

RpcEndDocPrinter

RpcEndDocPrinter notifies the print spooler that the application is at the end of the current print job.

Opnum: 23

RpcAddJob

RpcAddJob returns ERROR_INVALID_PARAMETER.

Opnum: 24

RpcScheduleJob

RpcScheduleJob returns ERROR_SPL_NO_ADDJOB.

Opnum: 25

RpcGetPrinterData

RpcGetPrinterData retrieves configuration data for a printer or print server.

Opnum: 26

RpcSetPrinterData

RpcSetPrinterData sets the configuration data for a printer or print server.

Opnum: 27

RpcWaitForPrinterChange

RpcWaitForPrinterChange retrieves information about the most recent change notification associated with a printer or print server.

Opnum: 28

RpcClosePrinter

RpcClosePrinter closes a handle to a printer object, server object, job object, or port object.

Opnum: 29

RpcAddForm

RpcAddForm adds a form name to the list of supported forms.

Opnum: 30

RpcDeleteForm

RpcDeleteForm removes a form name from the list of supported forms.

Opnum: 31

RpcGetForm

RpcGetForm retrieves information about a specified form.

Opnum: 32

RpcSetForm

RpcSetForm replaces the form information for the specified form.

Opnum: 33

RpcEnumForms

RpcEnumForms enumerates the forms that the specified printer supports.

Opnum: 34

RpcEnumPorts

RpcEnumPorts enumerates the ports that are available for printing on a specified server.

Opnum: 35

RpcEnumMonitors

RpcEnumMonitors retrieves information about the port monitors installed on the specified server.

Opnum: 36

Opnum37NotUsedOnWire

Reserved for local use.

Opnum: 37

Opnum38NotUsedOnWire

Reserved for local use.

Opnum: 38

RpcDeletePort

RpcDeletePort removes a port added by the RpcAddPortEx method.

Opnum: 39

RpcCreatePrinterIC

RpcCreatePrinterIC is called by the Graphics Device Interface (GDI) to create an information context for a printer.

Opnum: 40

RpcPlayGdiScriptOnPrinterIC

RpcPlayGdiScriptOnPrinterIC returns identifying information for fonts available for printing to a printer object.

Opnum: 41

RpcDeletePrinterIC

RpcDeletePrinterIC deletes a printer information context (IC).

Opnum: 42

Opnum43NotUsedOnWire

Reserved for local use.

Opnum: 43

Opnum44NotUsedOnWire

Reserved for local use.

Opnum: 44

Opnum45NotUsedOnWire

Reserved for local use.

Opnum: 45

RpcAddMonitor

RpcAddMonitor installs a local port monitor and links the configuration, data, and monitor files.

Opnum: 46

RpcDeleteMonitor

RpcDeleteMonitor removes a port monitor.

Opnum: 47

RpcDeletePrintProcessor

RpcDeletePrintProcessor removes a print processor.

Opnum: 48

Opnum49NotUsedOnWire

Reserved for local use.

Opnum: 49

Opnum50NotUsedOnWire

Reserved for local use.

Opnum: 50

RpcEnumPrintProcessorDatatypes

RpcEnumPrintProcessorDatatypes enumerates the data types that a specified print processor supports.

Opnum: 51

RpcResetPrinter

RpcResetPrinter resets the data type and device mode values to use for printing documents submitted by RpcStartDocPrinter (section 3.1.4.9.1).

Opnum: 52

RpcGetPrinterDriver2

RpcGetPrinterDriver2 retrieves printer driver data for the specified printer.

Opnum: 53

Opnum54NotUsedOnWire

Reserved for local use.

Opnum: 54

Opnum55NotUsedOnWire

Reserved for local use.

Opnum: 55

RpcFindClosePrinterChangeNotification

RpcFindClosePrinterChangeNotification closes a change notification object created by calling RpcRemoteFindFirstPrinterChangeNotification (section 3.1.4.10.3). The printer or print server associated with the change notification object will no longer be monitored by that object.

Opnum: 56

Opnum57NotUsedOnWire

Reserved for local use.

Opnum: 57

RpcReplyOpenPrinter

RpcReplyOpenPrinter establishes a context handle from the server to the client. The server uses the context handle to send notification data to the client machine.

Opnum: 58

RpcRouterReplyPrinter

RpcRouterReplyPrinter handles the notification coming from a remote router, as opposed to one coming from a print provider.

Opnum: 59

RpcReplyClosePrinter

RpcReplyClosePrinter closes the notification channel opened by the RpcReplyOpenPrinter (section 3.2.4.1.1) method between the server and client.

Opnum: 60

RpcAddPortEx

RpcAddPortEx adds a port name to the list of supported ports.

Opnum: 61

RpcRemoteFindFirstPrinterChangeNotification

RpcRemoteFindFirstPrinterChangeNotification creates a remote change notification object that monitors changes to printer objects and sends change notifications to the client using the method RpcRouterReplyPrinter (section 3.2.4.1.2).

Opnum: 62

Opnum63NotUsedOnWire

Reserved for local use.

Opnum: 63

Opnum64NotUsedOnWire

Reserved for local use.

Opnum: 64

RpcRemoteFindFirstPrinterChangeNotificationEx

RpcRemoteFindFirstPrinterChangeNotificationEx creates a remote change notification object that monitors changes to printer objects and sends change notifications to the client using the method RpcRouterReplyPrinterEx (section 3.2.4.1.4).

Opnum: 65

RpcRouterReplyPrinterEx

RpcRouterReplyPrinterEx handles the notification coming from a remote router, as opposed to one coming from a print provider. It is similar to RpcRouterReplyPrinter but an RPC_V2_UREPLY_PRINTER structure to specify the set of notifications that the client requested.

Opnum: 66

RpcRouterRefreshPrinterChangeNotification

RpcRouterRefreshPrinterChangeNotification returns change notification information.

Opnum: 67

Opnum68NotUsedOnWire

Reserved for local use.

Opnum: 68

RpcOpenPrinterEx

RpcOpenPrinterEx retrieves handle for a printer, port, port monitor, print job, or print server. This method is similar to RpcOpenPrinter but takes a pointer to an SPLCLIENT_CONTAINER (section 2.2.1.2.14) structure, which contains information about the connecting client.

Opnum: 69

RpcAddPrinterEx

RpcAddPrinterEx installs a printer on the print server. This method is similar to RpcAddPrinter but takes a pointer to an SPLCLIENT_CONTAINER structure, which contains information about the connecting client.

Opnum: 70

RpcSetPort

RpcSetPort sets the status associated with a printer port.

Opnum: 71

RpcEnumPrinterData

RpcEnumPrinterData enumerates configuration data for a specified printer.

Opnum: 72

RpcDeletePrinterData

RpcDeletePrinterData deletes specified configuration data for a printer.

Opnum: 73

Opnum74NotUsedOnWire

Reserved for local use.

Opnum: 74

Opnum75NotUsedOnWire

Reserved for local use.

Opnum: 75

Opnum76NotUsedOnWire

Reserved for local use.

Opnum: 76

RpcSetPrinterDataEx

RpcSetPrinterDataEx sets the configuration data for a printer or print server. This method is similar to RpcSetPrinterData but also allows the caller to specify the registry key under which to store the data.

Opnum: 77

RpcGetPrinterDataEx

RpcGetPrinterDataEx retrieves configuration data for the specified printer or print server. This method extends RpcGetPrinterData and can retrieve values sorted under a specified key by RpcSetPrinterDataEx.

Opnum: 78

RpcEnumPrinterDataEx

RpcEnumPrinterDataEx enumerates all value names and data for a specified printer and key. This method extends RpcEnumPrinterData by retrieving several values in a single call.

Opnum: 79

RpcEnumPrinterKey

RpcEnumPrinterKey enumerates the subkeys of a specified key for a specified printer. Printer data is stored in the registry.

Opnum: 80

RpcDeletePrinterDataEx

RpcDeletePrinterDataEx deletes specified configuration data for a printer. This method is similar to RpcDeletePrinterData but accesses the configuration data using a set of named and typed values that are stored in a hierarchy of registry keys.

Opnum: 81

RpcDeletePrinterKey

RpcDeletePrinterKey deletes a specified key and all of its subkeys for a specified printer.

Opnum: 82

Opnum83NotUsedOnWire

Reserved for local use.

Opnum: 83

RpcDeletePrinterDriverEx

RpcDeletePrinterDriverEx removes the specified printer driver from the list of supported drivers for a print server and deletes the files associated with the driver. This method is similar to RpcDeletePrinterDriver but can also delete specific versions of the driver.

Opnum: 84

RpcAddPerMachineConnection

RpcAddPerMachineConnection stores the print server name and the name of the binary executable used as a provider for a particular connection.

Opnum: 85

RpcDeletePerMachineConnection

RpcDeletePerMachineConnection deletes information about a server and connection provider.

Opnum: 86

RpcEnumPerMachineConnections

RpcEnumPerMachineConnections enumerates each of the connections and copies PRINTER_INFO_4 (section 2.2.1.10.5) structures for all the per-machine connections to the buffer pPrinterEnum.

Opnum: 87

RpcXcvData

RpcXcvData provides an extensible mechanism by which a client can control ports on the server and exchange port-specific commands and data with the server. See section 3.1.4.11 for details on language monitor methods.

Opnum: 88

RpcAddPrinterDriverEx

RpcAddPrinterDriverEx installs a printer driver on the print server. This method performs a function similar to RpcAddPrinterDriver and additionally allows options to be specified which permit printer driver upgrade, printer driver downgrade, copying of newer files only, and copying of all files regardless of their time stamps.

Opnum: 89

Opnum90NotUsedOnWire

Reserved for local use.

Opnum: 90

Opnum91NotUsedOnWire

Reserved for local use.

Opnum: 91

Opnum92NotUsedOnWire

Reserved for local use.

Opnum: 92

Opnum93NotUsedOnWire

Reserved for local use.

Opnum: 93

Opnum94NotUsedOnWire

Reserved for local use.

Opnum: 94

Opnum95NotUsedOnWire

Reserved for local use.

Opnum: 95

RpcFlushPrinter

RpcFlushPrinter is used by the printer driver to send a buffer of bytes to the port to cleanly abort a print job. It also allows delaying the I/O line to the printer.

Opnum: 96

RpcSendRecvBidiData

RpcSendRecvBidiData sends and receives bidirectional data. This method is used to communicate with port monitors that support such data.

Opnum: 97

Opnum98NotUsedOnWire

Reserved for local use.

Opnum: 98

Opnum99NotUsedOnWire

Reserved for local use.

Opnum: 99

Opnum100NotUsedOnWire

Reserved for local use.

Opnum: 100

Opnum101NotUsedOnWire

Reserved for local use.

Opnum: 101

Opnum102NotUsedOnWire

Reserved for local use.

Opnum: 102

RpcGetCorePrinterDrivers

RpcGetCorePrinterDrivers gets the GUIDs, versions, and publish dates of the specified core printer drivers, and the paths to their packages.

Opnum: 102

Opnum103NotUsedOnWire

Reserved for local use.

Opnum: 103

Opnum104NotUsedOnWire

Reserved for local use.

Opnum: 104

RpcGetPrinterDriverPackagePath

RpcGetPrinterDriverPackagePath gets the path to the specified printer driver package.

Opnum: 104

Opnum105NotUsedOnWire

Reserved for local use.

Opnum: 105

Opnum106NotUsedOnWire

Reserved for local use.

Opnum: 106

Opnum107NotUsedOnWire

Reserved for local use.

Opnum: 107

Opnum108NotUsedOnWire

Reserved for local use.

Opnum: 108

Opnum109NotUsedOnWire

Reserved for local use.

Opnum: 109

RpcGetJobNamedPropertyValue

RpcGetJobNamedPropertyValue retrieves the value of the specified Job Named Property (section 3.1.1) for the specified print job.

Opnum: 110

RpcSetJobNamedProperty

RpcSetJobNamedProperty creates a new Job Named Property or changes the value of an existent Job Named Property for the specified print job.

Opnum: 111

RpcDeleteJobNamedProperty

RpcDeleteJobNamedProperty deletes a Job Named Property for the specified print job.

Opnum: 112

RpcEnumJobNamedProperties

RpcEnumJobNamedProperties enumerates the Job Named Properties for the specified print job.

Opnum: 113

Opnum114NotUsedOnWire

Reserved for local use.

Opnum: 114

Opnum115NotUsedOnWire

Reserved for local use.

Opnum: 115

RpcLogJobInfoForBranchOffice

RpcLogJobInfoForBranchOffice processes one or more Branch Office Print Remote Log Entries (section 3.1.1).

Opnum: 116

In the preceding table, the term "Reserved for local use" means that the client MUST NOT send the opnum, and server behavior is undefined since it does not affect interoperability.<295>

All these methods are request/response RPC methods. They MUST return zero to indicate successful completion and nonzero values to indicate failure, except where specifically described.

Unless stated otherwise, if a method fails for any reason, returning a nonzero failure value, the server state as visible to the client through this or any other protocol MUST NOT change.

Two nonzero return codes have specific meanings in this protocol, ERROR_MORE_DATA and ERROR_INSUFFICIENT_BUFFER, as specified in [MS-ERREF]. When a method declaration in this specification has an output parameter that supplies a needed buffer size, one of the values in the following table can be returned from a call to that method to enable the caller to discover that size. Thus, there are circumstances in which a nonzero return value SHOULD NOT be treated as an error, but, instead, the client SHOULD allocate a buffer with a larger size and retry the request. These cases are noted in the method definitions in this section.

Error name/code

Meaning

ERROR_INSUFFICIENT_BUFFER

0x0000007A

The data area passed to a system call is too small.

ERROR_MORE_DATA

0x000000EA

More data is available.

 
Show:
© 2015 Microsoft