SetCalled Example for C++ 6.0 and later
{
CString strMsg;
//Create the associate
m_pLEADDicomNet->CreateAssociate (TRUE);
//set the Associate to the default
m_pLEADDicomNet->DefaultAssociate (m_pLEADDicomNet->GethPDU());
//set called application title
m_pLEADDicomNet->SetCalled (m_pLEADDicomNet->GethPDU(), "The Called Program");
//set calling application title
m_pLEADDicomNet->SetCalling (m_pLEADDicomNet->GethPDU(),"The Calling Program");
//display the current values
_bstr_t sCalled = m_pLEADDicomNet->GetCalled (m_pLEADDicomNet->GethPDU());
_bstr_t sCalling = m_pLEADDicomNet->GetCalling (m_pLEADDicomNet->GethPDU());
strMsg.Format( "GetCalled[%s]\nGetCalling[%s]", (char *)sCalled, (char *)sCalling);
AfxMessageBox (strMsg);
//Free associate
m_pLEADDicomNet->FreeAssociate ( m_pLEADDicomNet->GethPDU());
}