Export (0) Print
Expand All

3.1.4.11.4 WSDMON

This section describes the implementation of the XcvData method in WSDMON. This monitor module is used to control Web Services for Devices (WSD) printers.<444> WSDMON does not have a corresponding user interface module.

For network port naming, see section 2.2.4.10.

For structures used with the WSDMON monitor module, see section 2.2.2.15.

The following table discusses command values used by the WSDMON monitor module.

Value

Meaning

"CleanupPort"

Attempts to remove the Web Services for Devices (WSD) port associated with the hXcv handle. If printers are still using the port, it will not be removed.

"DeviceID"

Initiates a query for the WSD DeviceID. The required value for the pOutputData parameter is a non-NULL pointer to a buffer that is required to receive a string containing the WSD DeviceID (PKEY_PNPX_GlobalIdentity).

"PnPXID"

Initiates a query for the WSD PnPXID. The required value for the pOutputData parameter is a non-NULL pointer to a buffer that is required to receive a string containing the WSD PnPXID (PKEY_PNPX_ID).

"ResetCommunication"

Attempts to make sure that the communication between the printer and the operating system is working properly.

"ServiceID"

Initiates a query for the WSD ServiceID. The required value for the pOutputData parameter is a non-NULL pointer to a buffer that is required to receive a string containing the WSD ServiceID (PKEY_PNPX_ServiceID).

"CheckCluster"

Determines whether the queried server is a stand-alone server or a cluster node.<445> The required value for the pOutputData parameter is a non-NULL pointer to a variable that is required to receive the DWORD value 0x00000000 if the queried server is not a cluster node and a nonzero value otherwise.

"DiscoverDevice"

Uses WS-discovery directed unicast search to try to find a WSD–enabled device at the supplied URI of the endpoint.<446> The required value for the pInputData parameter is a non-NULL pointer to a string specifying the URI of the WSD endpoint. If a WSD device is found, and it supports the WSD print service definition, ERROR_SUCCESS is returned; otherwise, ERROR_PRINTER_NOT_FOUND is returned, as specified in [MS-ERREF].

"DriverAvailable"

Determines whether a printer driver for the queried device is available in the server's driver store.<447> The required value for the pInputData parameter is a non-NULL pointer to a string specifying the URI of the WSD endpoint. The required value for the pOutputData parameter is a non-NULL pointer to a buffer that is required to receive a WSD_DRIVER_DATA structure if the specified endpoint supports a WSD Printer Service and a driver is available. If the endpoint does not support the WSD Printer Service, ERROR_PRINTER_NOT_FOUND is returned, as specified in [MS-ERREF]. If no driver can be found, ERROR_CANNOT_DETECT_DRIVER_FAILURE is returned.

"AssocDevice"

Searches for a WSD Printer Service at the supplied URI of the endpoint and installs the printer if found.<448> This command is only supported on stand-alone servers. The required value for the pInputData parameter is a non-NULL pointer to a string specifying the URI of the WSD endpoint. If a WSD Printer Service is found, a PnPX installation of the printer is initiated; otherwise, ERROR_PRINTER_NOT_FOUND is returned, as specified in [MS-ERREF].

"AddPrinterPort"

Searches for a WSD Printer Service at the supplied URI of the endpoint, and if one is found, creates a new WSD port connected to the discovered device.<449> This command is only supported on cluster servers. The required value for the pInputData parameter is a non-NULL pointer to a string specifying the URI of the WSD endpoint. The required value for the pOutputData parameter is a non-NULL pointer to a buffer that is required to receive a string identifying the new port name if a WSD Printer Service is found; otherwise, ERROR_PRINTER_NOT_FOUND is returned, as specified in [MS-ERREF].

"BackupPort"

Initiates a query for the WSD port backup data.<450> The required value for the pOutputData parameter is a non-NULL pointer to a buffer that is required to receive a WSD_BACKUP_PORT_DATA structure.

"AssocDeviceMulticast""

Searches for a WSD Printer Service at the device endpoint that is specified by the GlobalID, which in turn is specified by the string pointed to by pInputData, and installs the printer if found.<451> This command is only supported on stand-alone servers. The required value for the pInputData parameter is a non-NULL pointer to a string specifying the GlobalID of the WSD endpoint. If a WSD Printer Service is found, a PnPX installation of the printer is initiated; otherwise, ERROR_PRINTER_NOT_FOUND is returned, as specified in [MS-ERREF].

"RestorePort"

Searches for a WSD printer service that is identified by the ServiceID at the device endpoint specified by the GlobalID and optionally RemoteURL, depending on the value of the DiscoveryMethod.<452>If the value of DiscoveryMethod is kMulticast, only the ServiceID and GlobalID values MUST be used for the search. If the value of DiscoveryMethod is kDirected, the ServiceID, GlobalID, and RemoteURL values MUST be used for the search. The required value for the pInputData parameter is a WSD_BACKUP_PORT_DATA_EX structure (section 2.2.2.15.3) that contains the values relevant to the printer port to restore. If a matching WSD printer service is found, a PnPX installation of the printer is initiated; otherwise a new port with the specified information is created with a status of PORT_STATUS_OFFLINE (section 2.2.1.9.3). The required value for the pOutputData parameter is a non-NULL pointer to a buffer that receives a string identifying the new port by name.

 
Show:
© 2014 Microsoft