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
Is this Safe or Unsafe?
Hi i made a few pages with lots of peoples help now i just want to know if they are safe or not can
Table sorting
Hi,
I'm trying to modify the following in order to make the output table sorted alphabeticall
Using CSS to format MySQL query
Hi,
If i want to have a news page on my site, which displays all records of a table in descen
simplexml and xpath - Need some help
Hello,
I am trying to parse an xml which comes back from Amazon and I am trying to know how m
Call to undefined function mysql_fetch_accoc()
New to php/mysql coding. What's wrong with this sequence, or am I
just not seeing to obvious?
Keeping track of php uploads
Hello all.
I was looking at the way PHP handles file uploads.
It seems that PHP uses a tem
Hom to make one url to open together with another url
I have a chat, which i want to be opened, as soon as the users login to the site. As it is now, when
Simpler method of getting variables from mysql
Hi Guys,
I'm trying to streamline my CMS's code and as I was writing a new page it occured to
post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit bu
Need help with some php code :)
Hey! I'm quite new to this whole thing, so please don't fire me with shait on this one =D
I'm