Available in LEADTOOLS Medical Imaging toolkits. |
#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 |
Win32, x64
See Also
Functions: |
|
Topics: |
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; }