Illegal operation... 
Author Message
 Illegal operation...

Hi,
I derived two socket class CPopSocket and CSmtpSocket from
CSocket,used them like the way showed below.The problem is if I quit my app
after closing dial-up connection down(manually) everything seems fine in
debug mode,but if reversed the order I got: Rnaapp: This program has
performed an illegal operation..., Detail:RNAAPP caused an invalid page
fault in module
<unknown>at 0084:... Debug:Unhandled exception in RNAAPP.EXE 0xC000005
Access Violation.(RNAAPP is not my app.It seems like the program which is in
charge of network affairs in Windows). I have no idea about this.Really want
to get help,or any clue.
Thanks.

Xiang Yan

////////////////////////
// Enviroment: MFC4.22, Windows98
/* I haven't overridden any virtual function of CSocket in its derivd
class.Can anyone show me some codes about onstructor,destructor, Close()
etc. of a CSocket derived class.I always worry about omitting something.*/
// MyView.app
CMyView::CMyView()
{
    m_smtpsocket.Create();

Quote:
}

CMyView::~CMyView()
{
    m_smtpsocket.Close();
Quote:
}

void CMyView::Func1()
{
   m_smtpsocket.myconnect(...);
...
Quote:
}

void CMyView::Func2()
{
    m_ppopthread=AfxBeginThread
   (fpopthread,
   &m_hWnd,
   THREAD_PRIORITY_NORMAL,
   0,
   0);
Quote:
}

UINT fpopthread(LPVOID pParam)
{
    BOOL ok;
    CPopSocket sockpop;
    ok=sockpop.Create();
    ...
   sockpop.ItsConnect(...);
   ...
  if(stopflag)
  {
      sockpop.Disconnect();
      sockpop.Close();
      return(0);
  }
...
Quote:
}



Wed, 23 May 2001 03:00:00 GMT  
 Illegal operation...
Sorry,although closed dial-up connection first ,I still got ILLEGAL
OPERATION... at next time of dial-up connection.Hope gurus help me.Thanks.
Xiang Yan


Fri, 25 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ILLEGAL OPERATION!!!

2. Illegal Operation!!!

3. Illegal Operations , Win95 and Borland 5.0

4. illegal operation error in DOS app

5. Return error: Illegal Operation

6. illegal operation in a while loop / getline

7. Illegal Operation -> Any help is highly wellcome

8. illegal operation

9. Getting illegal operation error

10. illegal operation

11. "Illegal operation" ERROR under VC++ development

12. Illegal Operation when Creating CCheckListBox

 

 
Powered by phpBB® Forum Software