I added some WinPcap initialization code to a radio-button's OnClick event. Part of my WinPcap initialization process is to display a dialog box with a list of availble network adapters for the user to select from. The ListBox, adapter selection, and OK button all work as intended. However if the user clicks CANCEL and then trys to exit the application the radio-button's OnClick event goes into a loop.....and this happens before the apps destructor even gets called. Anyone care to take a look at my code and see what maybe causing this loop?
Thanks!
Code:void CAutoSendDlg::OnPcapRadio() { if(SelectAdapter()){ // Adapter selection & initalization // Close SocketManager before opening pcap if (g_SocketMgrLoaded){ CAutoSendDlg::CloseSocketManager(); g_SocketMgrLoaded = FALSE; } g_PcapLoaded = TRUE; m_ProtoTypeCombo.EnableWindow(TRUE); m_MsgTypeCombo.EnableWindow(FALSE); m_PacketSummary = m_TxMsg.InfoSummary(); } else{ // Set radio button back to original selection CheckRadioButton(IDC_WINSOCK_RADIO,IDC_PCAP_RADIO,IDC_WINSOCK_RADIO); } }




Reply With Quote