L_DicomCloseForced

#include "ltdic.h"

L_LTDIC_API L_INT L_DicomCloseForced(hNet, bForced)

Closes an ISCL connection. This function is available in the PACS Imaging toolkits.

Parameters

HDICOMNET hNet

Handle to an existing DICOM Network. This is the handle returned from the L_DicomCreateNet function.

L_BOOL bForced

Flag that indicates whether to force the disconnection. Possible values are:

Value Meaning
TRUE Kill the connection. (Force the disconnection.)
FALSE Request disconnection. The disconnection can be refused by a peer.

Returns

Value Meaning
DICOM_SUCCESS The function was successful.
>0 An error occurred. Refer to Return Codes.

Comments

When bForced is TRUE, the connection is closed immediately. Therefore, it is best to determine if the ISCL message queue is empty before calling this function. To determine whether the ISCL queue is empty, use the L_DicomIsISCLQueueEmpty function.

Please note that L_DicomCloseForced(hNet, FALSE) is queued in the ISCL message queue. (It will be processed later.) L_DicomCloseForced(hNet, TRUE) is immediate, however.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

L_INT DicomCloseForcedExample(L_VOID) 
{ 
   L_INT nRet; 
   HDICOMNET hDicomNet = NULL; 
    
   hDicomNet = L_DicomCreateNet(TEXT(""), DICOM_SECURE_ISCL); 
 
   // do some initialization and communications 
   nRet = L_DicomCloseForced(hDicomNet, TRUE); 
 
   // delete and clear all data 
 
   return nRet; 
} 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C API Help