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.
Did you know?Explore Trending and Topic pages for more stories like this.
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
calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same
Problem executing bash script using shell_exec
Hi there,
I created a bash script file using following code to convert doc documents to pdf using
Problem with array max size.
Hi to everyone,
I've got a homework about filling a bidimensional array un spiral shape, I alre
Baffled by Undefined Index in Simple Array: Please Help!
Hello. I have a form which posts an array to this script. However, I can't seem to access the values
temporary objects
Until now i thought every temporary object in C++ is created as constant. I'm wondering why my compi
mysq_num_rows
Hi,
I want to use:
Code: if(mysql_num_rows($ergebnis2)==2)
how can the value 2, be
Printer configuration
Hi All,
Suppose one of the user deleted the printer settings unfortunatly ,then what is the pro
ALV sum various columns problem
Hi all,
I'm doing a report on ABAP for a timesheet of the current month. The output i want is s
Values disappear from my array :( HELP!
hey all, I have a lil mysql/php/apache script that queries a database
and pulls put 5 integers.
PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi