Share via


DeletePort function pointer

The DeletePort function is obsolete and is for use only with Windows NT 4.0 and previous versions.

DeletePort deletes a port from the monitor's environment.

Syntax

typedef BOOL ( WINAPI *pfnDeletePort)(
  _In_ HANDLE hMonitor,
  _In_ LPWSTR pName,
  _In_ HWND   hWnd,
  _In_ LPWSTR pPortName
);

Parameters

  • hMonitor [in]
    Caller supplied monitor instance handle. This is the handle returned by the monitor's InitializePrintMonitor2 function. (This parameter does not exist if the print monitor supports InitializePrintMonitor instead of InitializePrintMonitor2.)

  • pName [in]
    Pointer to a null-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 [in]
    Handle to the parent window of the port-deletion dialog box.

  • pPortName [in]
    Pointer to a null-terminated string that names the port to be deleted.

Return value

The return value is TRUE if the function is successful.

Remarks

The spooler calls DeletePort so a port monitor can 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.

Requirements

Target platform

Desktop

Header

Winsplp.h (include Winsplp.h)

See also

AddPort

InitializePrintMonitor2

 

 

Send comments about this topic to Microsoft