Connect Example for C++ 6.0 and later
#define PEER_PORT 104
void CDicomDlg::OnButton59()
{
int iHostPort = 0;
int iPeerPort = PEER_PORT;
CString strHostIP = ""; //empty string means use local IP
CString strPeerIP = "207.238.49.190"; //Put a valid IP addres of a computer to connect to
//startup the network
m_pLEADDicomNet->StartUp();
BSTR bstrPeerIP = strPeerIP.AllocSysString();
BSTR bstrHostIP = strHostIP.AllocSysString();
//connect to a server
m_pLEADDicomNet->Connect(bstrHostIP, iHostPort, bstrPeerIP, iPeerPort);
SysFreeString(bstrPeerIP);
SysFreeString(bstrHostIP);
}