XcvClosePort function

A port monitor server DLL's XcvClosePort function closes a printer port that was opened by XcvOpenPort.

Syntax

BOOL XcvClosePort(
  _In_ HANDLE hXcv
);

Parameters

hXcv

Caller-supplied printer handle obtained by calling OpenPrinter (described in the Microsoft Windows SDK documentation). This handle is created and returned by XcvOpenPort.

Return Value

If the operation succeeds, the function should return TRUE. Otherwise it should return FALSE.

Remarks

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.

Requirements

   
Target Platform Desktop
Header winsplp.h (include Winsplp.h)
Library NtosKrnl.exe

See Also

XcvOpenPort

AddPortUI