NetClose Example for C++ 6.0 and later
void CDicomNetSink::OnNetClose(long hNet, long nStatus, long hPeer)
{
_bstr_t strMsg;
CString strTmp;
strMsg = "*** NetClose Event ***\n";
//display some information about the connection:
strMsg = strMsg + "Host [" + m_pDlg->m_pLEADDicomNet->GetHostAddress (hNet) + "]\n";
strTmp.Format("Port[%d]\n\n", m_pDlg->m_pLEADDicomNet->GetHostPort (hNet));
strMsg = strMsg + strTmp;
strMsg = strMsg + "Peer[" + m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet) + "]\n";
strTmp.Format("Port[%d]\n", m_pDlg->m_pLEADDicomNet->GetPeerPort (hNet));
strMsg = strMsg + strTmp;
AfxMessageBox(strMsg);
}