// winsplp.h
BOOL XcvClosePort(
_In_ HANDLE hXcv
);
View the official Windows Driver Kit DDI referenceNo description available.
A port monitor server DLL's XcvClosePort function closes a printer port that was opened by XcvOpenPort.
hXcv [in]Caller-supplied printer handle obtained by calling OpenPrinter (described in the Microsoft Windows SDK documentation). This handle is created and returned by XcvOpenPort.
If the operation succeeds, the function should return TRUE. Otherwise it should return FALSE.
BOOL XcvClosePort(
_In_ HANDLE hXcv
);
Port monitor server DLLs are required to define an XcvClosePort function and include its address in a MONITOR2 structure.
The spooler's ClosePrinter function calls XcvClosePort if the printer name that was specified with a previous call to the OpenPrinter function included either of the strings "XcvPort" or "XcvMonitor". For more information, see AddPortUI. For more information about the OpenPrinter and ClosePrinter functions, see the Windows SDK documentation.
The function should close the port specified by the handle, and it should make the handle invalid.