| LEADTOOLS DICOM C DLL Help > Function References > L_DicomIsConnected | 
#include "ltdic.h"
L_LTDIC_API L_BOOL L_DicomIsConnected(hNet)
| HDICOMNET hNet; | /* a DICOM Network handle */ | 
Indicates whether a connection has been established. This function is available in the PACS Imaging Toolkit.
| Parameter | Description | 
| hNet | A DICOM Network handle. This is the handle created by calling L_DicomCreateNet. | 
Returns
| TRUE | A connection has been established. | 
| FALSE | A connection has not been established. | 
Comments
A connection is created by an SCU calling L_DicomConnect and the SCP responding by calling L_DicomAccept. If this has occurred successfully, this function will return TRUE. Otherwise, it will return FALSE.
For more information on creating a connection, refer to Creating a DICOM Network Connection.
Required DLLs and Libraries
| 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, Linux.
See Also
| Functions: | L_DicomConnect, L_DicomAccept, L_DicomCreateNet, L_DicomStartUp | 
| Topics: | |
| 
 | |
| 
 | 
Example
This example displays the connection status of a connection.
L_INT DicomIsConnectedExample(HDICOMNET hNet)
{
   if (L_DicomIsConnected(hNet) != FALSE)
      MessageBox(NULL, TEXT("connected"), TEXT("Notice"), MB_OK);
   else
      MessageBox(NULL, TEXT("disconnected"), TEXT("Notice"), MB_OK);
   return DICOM_SUCCESS;
}