Re: WinSock SendData -> unknown Exception
On Feb 15, 10:02 am, clinisbut <clinis...@gmail.com> wrote:
On Feb 14, 5:10 pm, clinisbut <clinis...@gmail.com> wrote:
I'm using MICROSOFT WINSOCK CONTROL 6.0 (not CSocket nor CAsyncSocket)
to send and receive data through sockets.
I'm getting an odd exception that seems to occour randomly (all
strange errors are seems randomly until solution is found) and
debugging I found that happens when I execute m_Winsock.SendData
(VARIANT).
Catching it doesn't seems to give me any information:
try
{
m_Winsock.SendData( v );=
//v is a variant with correct
data
}
catch( CException* e )
{
char info[300];
unsigned int code;
PUINT error_number = &=
code;
e->GetErrorMessage( info=
, 300, &code );
CString cadena;
cadena.Format("Error ocu=
rred: %s",info); //info is empty!!!!
AfxMessageBox( "-->"+cad=
ena );
e->Delete();
}
...unless I set a breakpoint inside the catch, where I see that is a
COleDispatchException.
What does it means?
I found a little more info about the error in "Variables" Window:
e
|-[COleDispatchException] {COleDispatchException}
|-CException {CExceptio=
n}
|-CObject {C=
Object}
|-__vfptr {=
0x5f58fd0c const
COleDispatchException::`vftable=B4
|-[0] =
0x5f55438a
COleDispatchException::GetRuntimeClass(void)
|-[1] =
0x5f5874e0
COleDispatchException::`scalar deleting destructor' (unsigned int)
|-[2] =
0x5f54b276
CObject::Serialize
|-[3] =
0x5f54b3ea
CObject::AssertValid
|-[4] =
0x5f54b3e4 CObject::Dump
|-m_strDescription {""}
|-m_dwHelpContext 0
|-m_strHelpFile {"MSWNSK98.chm"=
}
|-m_strSource {"Winsock"}
|_m_scError -2146828=
283
Since m_strDescription is empty, I don't know what's happening!!!
I found that data is being sended anyway... should I ignore it??