Async WSAConnect failed on XP with error code = 2 ("File not found")
Posted on
16th Feb 2014 07:03 pm by
admin
Hi all,
I have very strange bug, please help me if you can.
It is reproduced only on these conditions : WinXP, VS2005, VS2008, build in debug, execute without debugging.
On any other configuration or OS this code works fine.
Also works ok with old VC6.0.
I Tested it also on another XP just in case, same behavior.
I've isolated problematic code in a simple console application (no threads etc).
Just putting :
WSAEventSelect(...., FD_CONNECT | FD_READ | FD_CLOSE)
before WSAConnect, and WSAConnect will fail with error code 2 (means : File not found).
Which is not described in MSDN...also this is fail code when it really cannot connect (server is down or invalid).
If I remove WSAEventSelect (i.e. sync connect) all works.
If I debug code, all works.
If I put break point on WSAConnect line and run this app outside studio, then reach this breakpoint (start debugging) and step through WSAConnect WITH debugger it works....
I'm unable to find anything in the net about this strange behavior.
Also I'm trying to connect to FTP server, which works fine.
I'm attaching full code. It only test WSAConnect in async mode, nothing more.
10x,
Filip
No comments posted yet
Your Answer:
Login to answer
107
25
Other forums
Please help with SMTP Authenticated PHP Email Form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat
chat
hello i'm amir
i need a chat source code in asp.net 2.0 without Ajax.
anybody can help me?
a function to check directory depth
I'm working on a php script to upload files in to a set directory.
the user can select to upload
Convert Binary String to Decimal
Trying to Get:
Decimal: 305419896
Out of:
Binary String: xV4
Casting Decimals in Oracle
This code worked as a query in DB2, but I am not sure what the syntax is for casting decimals in Ora
Binding 2 UDP sockets on same port, connected to different destinations, 1 receives
Hello,
My application wants to send/recv data to 2 different UDP ports on a remote computer, us
RFQ Configuration - can you make PLANT field an optional field in ME42
Is there a way to make the plant field on an RFQ optional in change mode (ME42)?
update the selected existing records of database
Hi frndz,
I am new to php and get stuck....
Edit.php > Update.php > Updatea
PHP friend keyword equivalent
is there a PHP equivalent for the C++ friend keyword?
Creating a custom API
I'm creating a site, and I need to create a basic API. Unfortunately I have no idea where to start.