LDicomAssociate::IsMaxLength

#include "ltdic.h"

L_BOOL LDicomAssociate::IsMaxLength(L_VOID)

Determine whether the Maximum Length restriction is enabled or disabled for the DICOM Associate.

Returns

Value Meaning
TRUE The Maximum Length restriction is enabled.
FALSE The Maximum Length restriction is disabled.

Comments

A Maximum Length restriction can be placed on the data transport across a DICOM Associate connection. If the restriction is enabled, the value may be retrieved using LDicomAssociate::GetMaxLength, or set using LDicomAssociate::SetMaxLength.

To enable or disable the Maximum Length restriction, call LDicomAssociate::SetMaxLength.

Required DLLs and Libraries

Platforms

Win32, x64

See Also

Functions

Topics

Example

L_INT LDicomAssociate_IsMaxLengthExample(LDicomAssociate* m_pDicomAssociate) 
{ 
   L_INT    nRet; 
   long     lLen; 
   CString  cStr; 
 
   //...Assume associate object has been created 
 
   //is max len enabled? 
   if (m_pDicomAssociate->IsMaxLength()) 
   { 
      //disable it and display old value 
      lLen = m_pDicomAssociate->GetMaxLength(); 
      cStr.Format(TEXT("Maximum Length Disabled: %d"), lLen); 
      AfxMessageBox(cStr); 
      nRet = m_pDicomAssociate->SetMaxLength( FALSE, lLen); 
      if(nRet != DICOM_SUCCESS) 
         return nRet; 
   } 
   else 
   { 
      //enable it 
      long lNewLen = 8; 
 
      nRet = m_pDicomAssociate->SetMaxLength( TRUE, lNewLen); 
      if(nRet != DICOM_SUCCESS) 
         return nRet; 
 
      cStr.Format(TEXT("Maximum Length Enabled: %d"), lNewLen); 
      AfxMessageBox(cStr); 
   } 
 
   return DICOM_SUCCESS; 
} 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C++ Class Library Help