L_DicomCreateNet

#include "ltdic.h"

HDICOMNET EXT_FUNCTION L_DicomCreateNet(pszPath, nMode)

L_CHAR * pszPath;

/* character string */

L_UINT32 nMode;

/* initialization mode */

Allocates memory for the network structure and sets the site of the temporary files. This function is available in the Medical Suite 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 protocol security.

 

DICOM_SECURE_TLS

Transport Layer Secure protocol security.

Returns

A DICOM Network handle.

Comments

The allocated memory is freed by calling L_DicomFreeNet.

The LEADTOOLS DICOM DLL should be initialized before calling any DICOM Communication operations function. To initialize the DLL call L_DicomStartUp.

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:

L_DicomFreeNet, L_DicomStartUp

Topics:

Working with DICOM Network Connections

Example

L_VOID Test(L_VOID)
{
   /* This example constructs and destroys a Network class     */
   /* This example initializes and shutdown the network system */
   L_INT nRet;
   HDICOMNET hNet=NULL;
   
   /* start the network */
   nRet = L_DicomStartUp();

   /* set the temporary file path */
   hNet = L_DicomCreateNet("d:\\temp", DICOM_SECURE_ISCL);

   if(nRet == DICOM_SUCCESS)
      MessageBox(NULL, "StartUp() Successful", "Test", MB_OK);
   else
      MessageBox(NULL, "StartUp() Failed", "Test", MB_OK);
   /* Initialization of other secure parameters, if necessary */
   /*
      do some network communication here
   */
   /* ... */
   
   /* Free the object */
   L_DicomFreeNet(hNet);
   /* shut down the network */
   L_DicomShutDown();

}