| 
   Available in LEADTOOLS Medical Imaging toolkits.  | 
#include "ltdic.h"
virtual L_VOID LDicomNet::OnClose(nError, pNet)
| 
 L_INT nError;  | 
 /* error code */  | 
| 
 LDicomNet *pNet;  | 
 /* a DICOM Network object */  | 
Notifies a member of a connection that the connection was closed. This function is available in the PACS Imaging Toolkit.
| 
 Parameter  | 
 Description  | 
| 
 nError  | 
 Error code. Refer to Return Codes.  | 
| 
 pNet  | 
 The DICOM Network object for the peer member of the connection.  | 
Returns
None.
Comments
A call to this function is generated by a call to LDicomNet::Close. The LDicomNet::OnClose function is useful to both SCUs and SCPs.
To customize this function, you must derive a class from LDicomNet and override this function.
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:  | 
Example
//LMyDicomNet is a class derived from LDicomNet
//In class LMyDicomNet, all events (virtual functions OnXXX()) have been
//overridden so that they can be processed. Each event displays a MessageBox
//identifying the event
//the IP that generated the event, the IP that received the event
//any other relevant data
//For the entire derived class, see (hyperlink)LMyDicomNet class
//OnClose()--server or client receives this
L_VOID LMyDicomNet::OnClose(L_INT nError, LDicomNet *pNet)
{
   UNREFERENCED_PARAMETER(nError);
   L_TCHAR szHostAddress[100], szPeerAddress[100];
   L_UINT lHostPort, lPeerPort;
   CString strMsg;
   CString strTmp;
   
   strMsg ="*** OnClose ***\n";
   GetHostInfo(szHostAddress, 100,&lHostPort);
   strTmp.Format(TEXT("HostAddress[%s]\nHostPort[%d]\n"), szHostAddress, lHostPort);
   strMsg = strMsg + strTmp;
   
   pNet->GetPeerInfo(szPeerAddress, 100,&lPeerPort);
   strTmp.Format(TEXT("PeerAddress[%s]\nPeerPort[%d]\n"), szPeerAddress, lPeerPort);
   strMsg = strMsg + strTmp;   AfxMessageBox(strMsg);
}