コード例 #1
0
ファイル: Dlg_H323.cpp プロジェクト: tempbottle/TestSet
void CDlg_H323::OnClose()
{	
	ShowWindow(SW_HIDE);
	if(myContext->h245Channel && myContext->h225Channel)
	{
		OnHangup();	
		WaitForSingleObject(CH323MsgHandler::hRespondEvent,INFINITE);
		ResetEvent(CH323MsgHandler::hRespondEvent);
	}

	if(m_bViaGK)
	{
		//wait for unregistration confirm
		if(m_bRegistered)
		{
			UnregistrationRequest();
			WaitForSingleObject(CH323MsgHandler::hRespondEvent,INFINITE);
			ResetEvent(CH323MsgHandler::hRespondEvent);
		}
	}

	TerminateThread(m_hMonitorThread,0);

	if(myContext->callByGK == TRUE)
		ooCloseRasChannel(myContext);

	SaveIpAddr();
	ooSocketsCleanup();
	ooCloseContext(myContext);
	CDialog::OnClose();
}
コード例 #2
0
int ScreenCap::CreateTcpSocket()
{
    QString textIp = ui->lineEditIp->text();
//    QString textIp = ReadIpAddr();
//    ui->lineEditIp->setText(textIp);
    SaveIpAddr(textIp);

    if(RET_SUCESS != WithNetworkInit(textIp))
    {
        qDebug("CapThread create RET_FAIL!!\n");
        return RET_FAIL;
    }
    return RET_SUCESS;
}
コード例 #3
0
ファイル: Dlg_H323.cpp プロジェクト: tempbottle/TestSet
LRESULT CDlg_H323::OnRecvConnect(WPARAM wParam,LPARAM lParam)
{
	//record the successful connect ip address
	CComboBox *pCombo = (CComboBox*)GetDlgItem(IDC_H323_CALLED_ADDR);
	if(pCombo && pCombo->FindString(-1,LPCTSTR(m_strCalled)) == CB_ERR)
	{
		pCombo->AddString(m_strCalled);
		SaveIpAddr();
	}

	CloseCallingDlg();
	KillTimer(2006);
	CWnd *pBtn = GetDlgItem(IDC_H323_HANGUP);
	if(pBtn)
		pBtn->EnableWindow(TRUE);

	if(!m_bName)
		AddParty(myContext->localIP);
	else
		AddParty(LPCTSTR(m_strName));

	AddParty(m_strCalled);
    return 0;
}