LEADTOOLS DICOM C++ Class Library Help > Classes and Member Functions > LDicomNet > LDicomNet Class Members > LDicomNet::SendAssociateRequest |
Available in LEADTOOLS Medical Imaging toolkits. |
#include "ltdic.h"
L_INT LDicomNet::SendAssociateRequest(pPDU)
LDicomAssociate * pPDU; |
/* a DICOM Association object */ |
Sends an Associate Request message to a connection. This function is available in the Medical Imaging Suite Toolkit.
Parameter |
Description |
pPDU |
A DICOM Association object. This is the object created by calling LDicomAssociate::LDicomAssociate. |
Returns
0 |
SUCCESS |
>0 |
An error occurred. Refer to Return Codes. |
Comments
Calling LDicomNet::SendAssociateRequest generates a call to LDicomNet::OnReceiveAssociateRequest on the server. Within the callback function the server may accept or reject the Association request by calling LDicomNet::SendAssociateAccept or LDicomNet::SendAssociateReject.
A DICOM Association must be established between an SCU and an SCP before any DICOM messages or data can be transmitted between them. For more information on creating a DICOM Association, refer to Creating a DICOM Associate Connection.
When the DICOM Association is no longer needed, it should be ended. For more information, refer to Closing a DICOM Association.
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: |
LDicomNet::OnReceiveAssociateRequest, LDicomAssociate::LDicomAssociate, LDicomNet::SendAssociateAccept, LDicomNet::SendAssociateReject, LDicomNet::SendReleaseRequest |
Topics: |
|
|
|
|
|
|
|
|
|
|
Example
L_INT LDicomNet_SendAssociateRequestExample(LDicomNet* m_pDicomNet) { L_INT nRet; //create the Associate Class as Request LDicomAssociate DicomAssociateRequest(TRUE); DicomAssociateRequest.Default(); nRet = m_pDicomNet->SendAssociateRequest(&DicomAssociateRequest); if(nRet != DICOM_SUCCESS) return nRet; return DICOM_SUCCESS; }