A port monitor UI DLL's DeletePortUI function deletes a printer port.
BOOL
DeletePortUI(
PCWSTR pszServer,
HWND hWnd,
PCWSTR pszPortName
);
If the operation succeeds, the function should return TRUE. Otherwise it should return FALSE. If the operation is canceled by the user or is unsupported, the function should call SetLastError(ERROR_CANCELLED), then return FALSE.
Declared in winsplp.h. Include winsplp.h.
Port monitor UI DLLs are required to define a DeletePortUI function and include the function's address in a MONITORUI structure.
The spooler calls DeletePortUI from within its DeletePort function. The arguments received by DeletePortUI are the arguments received by DeletePort. (The DeletePort function is described in the Platform SDK documentation.)
The function should perform the following operations:
\\ServerName\,XcvPort PortName
where ServerName and PortName are the server and port names received as DeletePortUI function arguments.
The call to OpenPrinter requires a PRINTER_DEFAULTS structure, which is described in the Platform SDK documentation. The structure's DesiredAccess member must be set to SERVER_ACCESS_ADMINISTER. Its pDatatype and pDevMode members can be NULL.
This call causes the print monitor server DLL's XcvOpenPort function to be called.
This call causes the server DLL's XcvClosePort function to be called.