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

See Also

Functions:

LDicomAssociate::GetMaxLength, LDicomAssociate::SetMaxLength

Topics:

Working with DICOM Associate Connections

Example

{   
   //m_pDicomAssociate is a member variable declared as:
   //    LDicomAssociate *m_pDicomAssociate;
   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("Maximum Length Disabled: %d", lLen);
      AfxMessageBox(cStr);
      m_pDicomAssociate->SetMaxLength( FALSE, lLen);
   }
   else
   {
      //enable it
      long lNewLen = 8;
      m_pDicomAssociate->SetMaxLength( TRUE, lNewLen);
      cStr.Format("Maximum Length Enabled: %d", lNewLen);
      AfxMessageBox(cStr);
   }
}