DeletePort

BOOL (WINAPI *pfnDeletePort)(

LPWSTR pName,
HWND hWnd,
LPWSTR pPortName
);

DeletePort deletes a port from the monitor's environment.

Parameters

pName

Points to a zero-terminated string that specifies the name of the server on which the port to be deleted exists. If this parameter is null, the port is local.

hWnd

Handle to the parent window of the port-deletion dialog box.

pPortName

Points to a zero-terminated string that names the port to be deleted.

Return Value

The return value is TRUE if the function is successful.

Comments

The spooler calls DeletePort to delete a port from the monitor's environment. The monitor should delete the specified port from its state. The spooler will not call DeletePort on a monitor as long as a port is open.

Applications can delete local and remote ports. The printer UI displays a confirmation message box before the spooler calls DeletePort, so a monitor should ignore the hWnd parameter and not display another dialog box.

DeletePort is a port management function that must be implemented by port monitors and LMPMs. Pure language monitors should not implement this function.

See Also

AddPort, AddPortEx