NetNonSecureReceivedISCL example for C++ 6.0 and later

void CDicomNetSink::OnNetNonSecureReceivedISCL ( long hNet, long nError, VARIANT * vBuffer, long nLength )
{
   if(nError == DICOM_SUCCESS)
   {
      
      long Byte_1st, Byte_last, index_1st=0, index_last=nLength - 1;
      SafeArrayGetElement(vBuffer->parray, &index_1st, &Byte_1st);
      SafeArrayGetElement(vBuffer->parray, &index_last, &Byte_last);
      CString strMsg;
      strMsg.Format("1st byte of data = %ld, last byte of data = %ld", Byte_1st, Byte_last);
      AfxMessageBox(strMsg);
   }
}