NetReceive Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceive(long hNet, short nStatus, short nType, const VARIANT FAR& pData, long lSize) 
{
   CString strMsg;
   BSTR bstr;
   CString strPeerAddress;

   bstr = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
   strPeerAddress = bstr;
   SysFreeString(bstr);

   strMsg.Format("*** NetReceive Event***\nPeer[%s]\nnStatus[%d]\nnType[%d]\nlSize[%d]",
                  strPeerAddress,
                  nStatus,
                  nType,
                  lSize);
   
   AfxMessageBox(strMsg);
}