CPrintDialog::GetPortName
Retrieves the name of the currently selected printer port.
CString GetPortName( ) const;
The name of the currently selected printer port.
Call this function after calling DoModal or GetDefaults to retrieve the name of the currently selected printer port.
See the example for CPrintDialog::GetDeviceName.
Header: afxdlgs.h