Delete a port
Deleting a port consists of removing the port's stored name and user-modifiable configuration information from the port monitor server DLL's local storage or from the registry.
When an application calls the print spooler's DeletePort function, the DeletePort function calls the DeletePortUI function contained in the port monitor UI DLL of the appropriate port monitor.
The port monitor UI DLL's DeletePortUI function should perform the following operations:
Call the print spooler's OpenPrinter function, which causes the XcvOpenPort function in the port monitor server DLL to be called.
Call the print spooler's XcvData function one or more times, to request the port monitor server DLL to delete the port. The XcvData function calls the server DLL's XcvDataPort function.
Call the print spooler's ClosePrinter function, which causes the XcvClosePort function in the port monitor server DLL to be called.
For more information about these operations, see the description of DeletePortUI.