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.
typedef BOOL ( WINAPI *pfnDeletePort)( _In_ HANDLE hMonitor, _In_ LPWSTR pName, _In_ HWND hWnd, _In_ LPWSTR pPortName );
- 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.
The return value is TRUE if the function is successful.
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.