I have added error codes and a function
EXPORTSPEC DWORD daveGetOpenSocketErr();
to retrieve it.
Error is nonzero if anything fails...
Hope it helps, I include the modified files
btw, how to get the error string :
LPVOID lpMsgBuf; DWORD res = FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, daveGetOpenSocketErr(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, nullptr); if ( res > 0 ) { // use string ... LocalFree(lpMsgBuf); }
Log in to post a comment.
btw, how to get the error string :
Last edit: Marco Lazzarotto 2014-05-13