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
why preg_match_all does not return the number of matches
My regex looks like
X[^x{4e00}-x{9fa5}]*Y
(where X and Y are two Chinese characters)
javascript in php code causes page to display white
Hi All,
Odd one this, I've got the following code (below) which is a simple log in form. The
Syntax Help
Code:
im having trouble with that code snipped
Parse error: syntax error, unexpec
rename the file
File.txt
Code: ***DOCUMENT***
..DN:
000044255
..CB:
..SN:
..PY:
2009
..E
Database 'Validation'
Hi everyone,
I'm trying to validate the password entered by the user with the password in the dat
Problems with strings containing
Hey all,
I have encountered something strange in a script. I am trying to write an XML heade
issues verifying if user is logged in
I am having issues when a user logs in via asp Login control, the IsAuthenticated still seems to com
Web Host List
Here is a list of web hosts that offer PHP and MySQL. It is no where near a full list, but it is mos
Count number of records in all the tables with a querry URGENT PLEASE...
I downloaded ORACLE 9I DATA DUMP into my comp. There are number of tables. I need to find out the
Need help with simple code, back and forward buttons.
Basically, I have a set of pages in a folder, which have the title somephrasehere_09.php, somephrase