L_DicomIsImplementVersion

#include "ltdic.h"

L_LTDIC_API L_BOOL L_DicomIsImplementVersion(hPDU)

HDICOMPDU hPDU;

/* a DICOM Associate handle */

Determines whether setting the Implementation Version is enabled for the specified DICOM Associate.

Parameter

Description

hPDU

A DICOM Associate handle.

Returns

TRUE

Setting the Implementation Version is enabled.

FALSE

Setting the Implementation Version is disabled.

Comments

If setting the Implementation Version is enabled, the name may be retrieved using L_DicomGetImplementVersion, or set using L_DicomSetImplementVersion.

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:

L_DicomGetImplementVersion, L_DicomSetImplementVersion

Topics:

Working with DICOM Associate Connections

Example

L_INT DicomIsImplementVersionExample(HDICOMPDU hPDU)
{
   L_TCHAR szMsg[200];
   L_TCHAR szImplementVersion[PDU_MAX_VERSION_SIZE+1];
   L_INT nRet;

   /* ...Assume association has been created */
   if(L_DicomIsImplementVersion(hPDU))
   {      
      /* disable it and display old value */
      L_DicomGetImplementVersion(hPDU, szImplementVersion, PDU_MAX_VERSION_SIZE+1);
      wsprintf(szMsg, TEXT("ImplementVersion Disabled: \n%s"), szImplementVersion);
      nRet = L_DicomSetImplementVersion(hPDU, FALSE, szImplementVersion);
      if (nRet != DICOM_SUCCESS)
         return nRet;

      MessageBox(NULL, szMsg, TEXT("Test"), MB_OK);
   }
   else
   {        
      /* enable it */
      nRet = L_DicomSetImplementVersion(hPDU, TRUE, TEXT("v14.0"));
      if (nRet != DICOM_SUCCESS)
         return nRet;

      L_DicomGetImplementVersion(hPDU, szImplementVersion, PDU_MAX_VERSION_SIZE+1);
      wsprintf(szMsg, TEXT("ImplementVersion Enabled: \n%s"), szImplementVersion);
      MessageBox(NULL, szMsg, TEXT("Test"), MB_OK);
   }

   return DICOM_SUCCESS;
}