NetReceiveNCreateResponse Example for C++ 6.0 and later

void CDicomNetSink::OnNetReceiveNCreateResponse(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, long nStatus, long hDS) 
{
   CString strMsg;
   
   _bstr_t strPeerAddress = m_pDlg->m_pLEADDicomNet->GetPeerAddress (hNet);
   
   strMsg.Format("*** OnNetReceiveNCreateResponse ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\npszInstance[%s]\nnStatus[%d]\npDS[%x]",
                  (char *)strPeerAddress,
                  nPresentationID, 
                  nMessageID, 
                  pszClass,
                  pszInstance, 
                  nStatus, 
                  hDS);

   AfxMessageBox(strMsg);
}