L_DicomCloseForced

#include "ltdic.h"

L_INT EXT_FUNCTION L_DicomCloseForced(hNet, bForced)

HDICOMNET hNet;

/* handle to an existing DICOM Network */

L_BOOL bForced;

/* flag */

Closes an ISCL connection. This function is available in the Medical Suite toolkits.

Parameter

Description

hNet

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

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

DICOM_SUCCESS

Success.

>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

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_DicomIsISCLQueueEmpty

Topics:

DICOM Net: ISCL connection

 

Closing an ISCL Connection

 

General Integrated Secure Communication Layer (ISCL) Information

Example

{
   HDICOMNET hDicomNet = NULL;
   hDicomNet = L_DicomCreateNet ("", DICOM_SECURE_ISCL);
   // do some initialization and communications
   L_DicomCloseForced (hDicomNet, TRUE);
   // delete and clear all data
}