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
How to Detect it is public_html or httpdocs?
How to check whether it is cPanel or Plesk?
If it found public_html perform <?php incl
Check before inserting in DB ???
This is my code
---------------
if ( $_POST ['Submit'])
{{
$username = $_POST ['usernm
trouble printing an array....
I'm having some trouble printing out an array forwards. I'm figuring out the high and low of an arra
MYSQL INSERT ID NOT WORKING
Code: $id = mysql_insert_id();
header("Location: ./?view=$id");
Why $id pulling blan
Secure FTP
Hi experts,
There is no SFTP action in MII workbench.
This means it needs developing custo
Expandable Post Code
Hi,
Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so i
Switch letters in message (basic cryptology)...
I am trying to switch letters around in a message for an application on my site (see here). The prob
how to make database item unique
Hey guys,
is it possible to do this:
I have the database item $title being pulled for
RadioButtonList item spacing
I have a RadioButtonList and I can't put any spacing between the items. They are arranged verticall
Certain files upload, while others do not
I want to read the data from an uploaded file. Not sure why, but it only uploads for certain files.