L_DicomIsMaxLength
#include "ltdic.h"
L_LTDIC_API L_BOOL L_DicomIsMaxLength(hPDU)
HDICOMPDU hPDU; |
/* a DICOM Associate handle */ |
Determines whether the Maximum Length restriction is enabled or disabled for the specified DICOM Associate.
Parameter |
Description |
hPDU |
A DICOM Associate handle. |
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 L_DicomGetMaxLength, or set using L_DicomSetMaxLength.
To enable or disable the Maximum Length restriction, call L_DicomSetMaxLength.
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: |
|
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; }