Send returns SOCKET_ERROR but GetLastError() returns 0 ?

I have a problem where I am using the CAsyncSocket function Send and it returns SOCKET_ERROR and I check the GetLastError ( I actualy check all of the following: CAsyncSocket::GetSockOpt(SO_ERROR..., CAsyncSocket::GetLastError(), WSAGetLastError(), and Generic MFC ::GetLastError() ) and it is zero. For this case I currently just try and resend the message, but this just results in an infinite loop. How am I supposed to handle the case where Send says I have an error, but all possible GetLastError calls say there is no error (without just dropping the current message)?

Thanks,

Harry

[926 byte] By [HarrySK] at [2008-1-10]
# 1

On what OS are you experiencing the problem?

I've been using CAsyncSocket on nt4, win2k and XP without any problems but when moving to Vista I've experienced the same problem.

Kontraband at 2007-10-3 > top of Msdn Tech,Windows Networking Development,Winsock Kernel (WSK)...
# 2
XP SP2
HarrySK at 2007-10-3 > top of Msdn Tech,Windows Networking Development,Winsock Kernel (WSK)...