klambiguit
November 12th, 2008, 01:56 AM
Hello MFC networking gurus. i'm having some trouble in my program. It generates an access violation runtime error and when i debug it, it points to the assertion in the title.
it's a client based CSocket Application where all i did was follow the normal flow.
1. AfxSocketInit()
2. CreateSocket();
3. Connect();
the error occurs in the create part.
a little detailed design of the program is:
class CSockMgrDLGDlg : public CDialog
{
//other functions and attributes
private:
CommunicationMgr *oComMgr;
};
class CommunicationMgr
{
//other functions and attributes
private:
CSocketMgr *oSocketMgr;
}
class CSocketMgr : public CSocket
{
//some functions and attributes
};
CSockMgrDLGDlg uses CommunicationMgr for connectivity. CSockMgrDLGDlg calls the CommunicationMgr::Connect() function
and CommunicationMgr::Connect calls CSocket::Connect() that goes for XXX::Create() too.
Question:
1. what do you think are the possible reasons that this access violation error is occurring?
2. will there be some hidden bugs/runtime errors created if CSockMgrDLGDlg doesn't use CSocketMgr directly?
thank you very much in advance..
it's a client based CSocket Application where all i did was follow the normal flow.
1. AfxSocketInit()
2. CreateSocket();
3. Connect();
the error occurs in the create part.
a little detailed design of the program is:
class CSockMgrDLGDlg : public CDialog
{
//other functions and attributes
private:
CommunicationMgr *oComMgr;
};
class CommunicationMgr
{
//other functions and attributes
private:
CSocketMgr *oSocketMgr;
}
class CSocketMgr : public CSocket
{
//some functions and attributes
};
CSockMgrDLGDlg uses CommunicationMgr for connectivity. CSockMgrDLGDlg calls the CommunicationMgr::Connect() function
and CommunicationMgr::Connect calls CSocket::Connect() that goes for XXX::Create() too.
Question:
1. what do you think are the possible reasons that this access violation error is occurring?
2. will there be some hidden bugs/runtime errors created if CSockMgrDLGDlg doesn't use CSocketMgr directly?
thank you very much in advance..