DeletePort

  BOOL DeletePort(pName, hWnd, pPortName)    
  LPSTR pName;    
  HWND hWnd;    
  LPSTR pPortName;    

This function allows a port to be deleted. This function will fail if a printer exists that is connected to this port.

Parameters

pName

Specifies the name of the server that the port is to be deleted. If NULL, then the port is to be deleted locally,

hWnd

Specifies the parent window handle that the dialog box should be created with.

pPortName

Specifies the port that should be deleted. This name is retrieved by calling the EnumPorts function.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.