LDicomNet::LDicomNet

#include "ltdic.h"

L_VOID LDicomNet::LDicomNet(pszPath, nMode)

L_VOID LDicomNet::LDicomNet(pszPath, nMode, bReserved)

L_TCHAR * pszPath;

/* character string */

L_UINT32 nMode;

/* initialization mode */

L_BOOL bReserved;

/* reserved for future use */

Allocates memory for the network structure and sets the site of the temporary files. This function is available in the PACS Imaging Toolkit.

Parameter

Description

pszPath

Character string containing the location of the temporary files. DICOM uses temporary files during the course of creating a file. If this parameter is NULL, the DICOM temporary files are kept in the directory Windows places its own temporary files. If this parameter is not NULL, the temporary files are placed in the specified directory.

nMode

Flag that indicates the security mode to use when initializing the network structure. Possible values are:

 

Value

Meaning

 

DICOM_SECURE_NONE

No security mode.

 

DICOM_SECURE_ISCL

Integrated Secure Communication Layer security mode.

 

DICOM_SECURE_TLS

Transport Layer Security security mode.

bReserved

Reserved for future use. Pass 0.

Returns

None.

Comments

LDicomNet::LDicomNet(pszPath,nMode) Free any allocated memory by calling LDicomNet::~LDicomNet.

To initialize the LEADTOOLS DICOM DLL, call LDicomNet::StartUp.

The LEADTOOLS DICOM DLL must be initialized before using any of the Network operation functions.

If an incorrect value is passed for the nMode parameter, the object will be initialized without using a security mode.

LDicomNet::LDicomNet(pszPath,nMode,bReserved) Use this version of the LDicomNet constructor to modify the default security settings, or to use non-default security settings. As with LDicomNet::LDicomNet(pszPath,nMode), free any allocated memory by calling LDicomNet::~LDicomNet, and initialize the LEADTOOLS DICOM DLL by calling LDicomNet::StartUp. If an incorrect value is passed for the nMode parameter, the object will be initialized without using a security mode. In addition, when using LDicomNet::LDicomNet(pszPath,nMode,bReserved) it is also necessary to call LDicomNet::Initialize. For more information, refer to LDicomNet::Initialize. Note that the following uses of the LDicomNet constructors are functionally equivalent:

1.

LDicomNet *pNet = new LDicomNet(pszPath, nMode);

2.

LDicomNet *pNet = new LDicomNet(pszPath, nMode, 0);
If (pNet)
 pNet->Initialize(pszPath, nMode, NULL);

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:

LDicomNet::~LDicomNet, LDicomNet::StartUp, LDicomNet::Initialize

Topics:

Working with DICOM Network Connections

Example

This is an example for LDicomNet::LDicomNet(pszPath,nMode).

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
L_INT LDicomNet__LDicomNetExample( LMyDicomNet *m_pDicomNet)
{
   //LMyDicomNet is a class derived from LDicomNet
   //m_pDicomNet is a member variable declared as:
   //    LMyDicomNet *m_pDicomNet;
   int nRet;
   //start the network
   nRet = m_pDicomNet->StartUp();
   
   if (nRet == DICOM_SUCCESS)
      AfxMessageBox(TEXT("StartUp() Successful"));
   else
   {
      AfxMessageBox(TEXT("StartUp() Failed"));
      return nRet;
   }
   
   //set the temporary file path
   m_pDicomNet = new LMyDicomNet(MAKE_IMAGE_PATH(TEXT("temp")), DICOM_SECURE_NONE);
   
   //...
   //...do some network communication here
   //...
   
   //shut down the network
   m_pDicomNet->ShutDown();
   
   //this calls the LDicomNet destructor delete m_pDicomNet;
   return DICOM_SUCCESS;
}