BOOL DeletePort( LPTSTR pName, HWND hWnd, LPTSTR pPortName );
A port management function that frees the port monitor of any responsibility for managing the port or monitoring print jobs on the port.
Returns TRUE if the operation is successful.
pName | Points to a zero-terminated string that names the machine on which the port specified in the pPortName parameter exists. |
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. |
The DeletePort function is called when the spooler decides to delete a port from its environment. The port monitor is responsible for actually performing the deletion. The DeletePort function should delete all knowledge of the specified port from the port monitor state.
The DeletePort function will never be called when the specified port is in use (opened).