NetReceiveNSetResponse Example for C++ 6.0 or later

void CDicomNetSink::OnNetReceiveNSetResponse (long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long nStatus, long hDS) 
{
   //The client receives a N-Set response from the server
   //
   //In this example:
   //1. A connection exists between client and server
   //2. An association exists between the client and server
   CString strMsg;
   _bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress ( hNet);
   strMsg.Format("*** OnNetReceiveNSetResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnStatus[%d]\nhDS[%x]\n", 
      (char *)strPeerAddress,
      nPresentationID, 
      nMessageID, 
      pszClass,
      pszInstance, 
      nStatus,
      hDS);
   AfxMessageBox(strMsg);
}