L_DicomIsMaxLength

#include "ltdic.h"

L_LTDIC_API L_BOOL L_DicomIsMaxLength(hPDU)

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

Parameters

HDICOMPDU hPDU

A DICOM Associate handle.

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 L_DicomGetMaxLength, or set using L_DicomSetMaxLength.

To enable or disable the Maximum Length restriction, call L_DicomSetMaxLength.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

L_INT DicomIsMaxLengthExample(HDICOMPDU hPDU) 
{ 
  L_UINT32 lLen; 
  L_TCHAR szOut[400]; 
  L_UINT32 lNewLen = 8; 
  L_INT nRet; 
 
  /* ...Assume association has been created */ 
  /* is max length enabled? */ 
  if(L_DicomIsMaxLength(hPDU)) 
  { 
     /* disable it and display old value */ 
     lLen = L_DicomGetMaxLength(hPDU); 
     wsprintf(szOut, TEXT("Maximum Length Disabled: %d"), lLen); 
     MessageBox(NULL, szOut, TEXT("Test"), MB_OK); 
     nRet = L_DicomSetMaxLength(hPDU, FALSE, lLen); 
     if (nRet != DICOM_SUCCESS) 
        return nRet; 
  } 
  else 
  { 
     /* enable it */ 
     nRet = L_DicomSetMaxLength(hPDU, TRUE, lNewLen); 
     if (nRet != DICOM_SUCCESS) 
        return nRet; 
 
     wsprintf(szOut, TEXT("Maximum Length Enabled: %d"), lNewLen); 
     MessageBox(NULL, szOut, TEXT("Test"), MB_OK); 
  } 
 
  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 API Help