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

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

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64

See Also

Functions:

LDicomAssociate::GetMaxLength, LDicomAssociate::SetMaxLength

Topics:

Working with DICOM Associate Connections

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS DICOM C++ Class Library Help