Available in LEADTOOLS Medical Imaging toolkits. |
LDicomNet::SendReleaseRequest
#include "ltdic.h"
L_INT LDicomNet::SendReleaseRequest(L_VOID)
Sends a Release Request message to a connection. This function is available in the PACS Imaging Toolkit.
Returns
0 |
SUCCESS |
>0 |
An error occurred. Refer to Return Codes. |
Comments
Calling LDicomNet::SendReleaseRequest generates a call to LDicomNet::OnReceiveReleaseRequest on the server. The server will call LDicomNet::SendReleaseResponse which will generate a call to LDicomNet::OnReceiveReleaseResponse on the client. At this time the DICOM Association may be closed. For more information, refer to Ending a DICOM Association.
Please note that this method of closing a DICOM Association is preferable to just calling LDicomNet::SendAbort.
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 STATUS_SERVER 0x0001 L_INT LDicomNet__SendReleaseRequestExample(LMyDicomNet *m_pDicomNet,L_INT m_nStatus) { //In this example, the m_pDicomNet object sends a release request to the peer. //The m_pDicomNet object can point to an object that is a server or a client // //LMyDicomNet is a class derived from LDicomNet //m_pDicomNet is a member variable declared as: // LMyDicomNet *m_pDicomNet; //m_nStatus is member variable that identifies whether LDicomNet object is a server or client //m_nStatus can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT) // int m_nStatus; // // //In this example, assume //1. m_pDicomNet points to a valid object //2. A connection exists between client and server //3. An associate request has been sent and accepted //4. m_nStatus is either STATUS_SERVER or STATUS_CLIENT L_UINT32 lClients; LDicomNet *pDicomNet; L_INT nRet; if (m_nStatus == STATUS_SERVER) { //get the latest client lClients = m_pDicomNet->GetClientCount(); pDicomNet = m_pDicomNet->GetClient(lClients - 1); } else //STATUS_CLIENT { pDicomNet = m_pDicomNet; } //send a Release Request message nRet =pDicomNet->SendReleaseRequest(); if(nRet > 0) return nRet; AfxMessageBox(TEXT("Sending ReleaseRequest message")); return DICOM_SUCCESS; }