Determine whether the Maximum Length restriction is enabled or disabled for the DICOM Associate.
#include "ltdic.h"
L_BOOL LDicomAssociate::IsMaxLength(L_VOID)
Value | Meaning |
---|---|
TRUE | The Maximum Length restriction is enabled. |
FALSE | The Maximum Length restriction is disabled. |
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.
Win32, x64
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 Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document