L_DicomCreateNet

#include "ltdic.h"

L_LTDIC_API HDICOMNET L_DicomCreateNet(pszPath, nMode)

L_TCHAR * pszPath;

character string

L_INT32 nMode;

initialization mode

Allocates memory for the network structure and sets the site of the temporary files.

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

Platforms

Win32, x64, Linux.

See Also

Functions:

L_DicomFreeNet, L_DicomStartUpL_DicomEnableOptimizedMemorySend

Topics:

Working with DICOM Network Connections

Example

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName 
L_INT DicomCreateNetExample(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(); 
   if (nRet != DICOM_SUCCESS) 
      return nRet; 
   /* set the temporary file path */ 
   hNet = L_DicomCreateNet(MAKE_IMAGE_PATH(TEXT("")), DICOM_SECURE_ISCL); 
   if(nRet == DICOM_SUCCESS) 
      MessageBox(NULL, TEXT("StartUp() Successful"), TEXT("Test"), MB_OK); 
   else 
      MessageBox(NULL, TEXT("StartUp() Failed"), TEXT("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(); 
   return DICOM_SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS DICOM C API Help