GetStatusISCL Example for C#

// In this example, assume an error occurs in the NetReceive event. The code to
// determine why this happened should look like this:
//LEADDICOMNet1 is a predefined LEADDicomNet object
private void LEADDICOMNet1_NetReceive(int hNet, int nStatus, short nType, object pData, int lSize)
{
   int nStatusISCL = 0;
   nStatusISCL = LEADDICOMNet1.GetStatusISCL(hNet);
   if (nStatus == (int)LTDicomKernelLib.DicomErrorCodes.DICOM_ERROR_ISCL_DECRYPT)
   {
      if (nStatusISCL == 24)
      {
         // error decrypting message data
         MessageBox.Show("Error decrypting message");
      }
      if (nStatusISCL == 25)
      {
         // error decrypting MAC code
         MessageBox.Show("Error decrypting MAC code");
      }
   }
}