Re: problem creating asyncSocket in XP
ERROR_ALREADY_EXISTS
183
0xB7
Cannot create a file when that file already exists.
Above is the system error code, and this is not a WSA Error message
specifically. You should not treat it like WSAEWOULDBLOCK. That said, the
code you have posted does not seem to have errors in it, assuming it
compiles. There is an issue somewhere else in the code.
You could google for ERROR_ALREADY_EXISTS and see what comes up. I found a
number of things when I did that.
Andy
"tabataa" <tabataa@discussions.microsoft.com> wrote in message
news:85439038-3DC6-44C7-BB66-DE49377BF041@microsoft.com...
Hi,
I am migration a program running on Nt to XP, in NT everything works
fine,
but in XP the connect call fails with a weird error (183), i catch the
error
and continue with the execution as if it returns a WSAEWOULDBLOCK, when i
get
the message in Onconnet (response time expired, the ip i am connecting to
is
not connected) i close the socket and try again, but the next time i do
the
create it crash with the same error (183)... the weird thing is that the
same
code is perfectly running on NT.
Anybody?
Thanks in advance
int CClisock::NCreaSocket()
{
int nErr;
//creo el socket
if (Create( /*PORT_NUM, SOCK_STREAM,
FD_READ|FD_WRITE|FD_CONNECT|FD_CLOSE*/) == 0)
{
m_bConnected = FALSE;
m_bHaySock = FALSE;
return -1;
}
//me intento conectar para mantener una conexion establecida
if (Connect(m_sDirIp, PORT_NUM) == 0)
{
nErr = GetLastError();
if (nErr != WSAEWOULDBLOCK)
{
m_pInfof->VInfof(INFO_ERR, "NCreaSocket Connect Err: %d", nErr);
VCierraSocket();
return -1;
}
}
m_bHaySock = TRUE;
return 1;
}