Monitor Module Methods

A monitor module is a server-side executable object that provides a communication path between a print server and the drivers that access hardware on a machine. A port monitor module manages access to I/O port hardware.

Port monitor modules are implementation specific for a given port type.

A port monitor module provides the actual implementation used by the print spooler when one of the Port Management Methods (section is called. The print spooler also uses methods provided by the port monitor module to communicate with the physical print device.

Port monitor modules MUST support the following methods:

  • Either: OpenPort or OpenPortEx

  • ClosePort

  • StartDocPort

  • WritePort

  • ReadPort

  • EndDocPort

Port monitor modules MAY<369> support the following optional methods:

  • AddPort

  • AddPortEx

  • ConfigurePort

  • DeletePort

Port monitor modules SHOULD support an additional set of methods, all of which MUST either be implemented together or not be present at all:

  • XcvOpenPort

  • XcvClosePort

XcvData SHOULD support the following actions (section

  • AddPort

  • DeletePort

  • MonitorUI

Actions MUST be specified by the client in a string pointed to by the pszDataName parameter of RpcXcvData.

Additional actions MAY be supported in a given implementation.<370> The following sections, LOCALMON and LPRMON, describe the implementation of the XcvData method, its supported actions, and corresponding behaviors in the LOCALMON and LPRMON monitor modules. All method descriptions assume the standard buffer size validation pattern, as specified for the RpcXcvData method. Unless otherwise specified, for actions not using pInputData, pInputData MUST be NULL and cbInputData MUST be zero. Unless otherwise specified, for actions not using pOutputData, pOutputData MUST be NULL, cbOutputData MUST be zero, and pcbOutputNeeded MUST be NULL. For historical reasons, the names of some of the actions supported by XcvData are identical to some of the other port monitor module methods. The server method RpcXcvData routes calls to a port monitor's XcvData method, and the parameter lists of RpcXcvData and the port monitor's XcvData are identical.