Casyncsocket::Connect behavior different in release build

I've a routine that creates a sock_stream (tcp) socket, connects, and
communicates that uses mfc casyncsocket class.  I've been using it in
debug
mode build for a couple years.  After the connect() call, if the return is
0
it checks if GetLastError is WSAEWOULDBLOCK, and if it is awaits an
OnConnect callback.  It's always worked pretty much "exactly" as the
CAsyncSocket::Connect call describes.

I switched to release build just a few days ago, and have been fixing
various things that worked forgivingly in debug build (mostly
initialization
issues).  The really curious thing is that after calling Connect() and
finding the return is 0, I must now accept GetLastError == WSAEWOULDBLOCK
(as before), but also GetLastError == 183.  Trial & error tells me that it
seems to be the normal response of what used to be WSAEWOULDBLOCK.  This
doesn't even look like a winsock error code (it's certainly not over 10000
.... WSABASEERR).

If 183 is a system error (in my system error code list 183 Cannot create a
file when that file already exists. ERROR_ALREADY_EXISTS) doesn't make
sense
for a tcp connect() ... treating it identically to WSAEWOULDBLOCK seems to
work and then the program communicates over the socket.

I could just leave it working and move on, but am wondering if the release
build alters the winsock return codes, or if anyone might be able to shed
light on why I am getting this value.

- Rich



0
x
6/3/2005 11:19:34 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
715 Views

Similar Articles

[PageSpeed] 36

Reply:

Similar Artilces:

Slow Internet Connection, HELP
Hey Vista Home, I guess it's an Acer Laptop, (don't have the computer in front of me now) My girlfriend has a got a new ISP. Originally she uses a cable to connect to the switch/modem, But now another ISP have installed a new modem/switch in her house. the cable guy left the modem without connecting any cat5 cables to the modem/switch so the computer where offline for a while until I plugged in the cable to the modem... The cable isn't that nessecery as the modem is sending wireless also.... but when using cable connection the trasfer rate (incoming) is 7kb/s, ...

Routing Group Connections between Administrative Groups?
I have a question regarding the subject... since I don't have an option to try this for myself: When multiple routing groups and routing group connectors between them are used... how does one establish a rgc between routing groups that are handeled in separate administrative groups? Let's say that an administrator has full administrative permissions only within his given administrative group. If there are no two-way connectors established between the routing groups in other administrative groups the communication doesn't work, right? So am I right in concluding that the administra...

Make Outlook Name Different Than How GAL Lists It
My client is unhappy with how his emails get sent out from MS Outlook. The GAL on our server lists names as [Last Name], [First Name]. This is how the majority of our clients want it. However, he wants his to be [First Name] [Last Name]. We can't do this for him on our GAL, since it was obviously cause an inconsistency. But, I figured I'd post here to see if anything else can be done to accomodate him. Thanks in advance for your help! "D E K E R" <rajwani@gmail.com> wrote in message news:1141741538.684773.187150@e56g2000cwe.googlegroups.com... > My client is un...

automate printing different ranges on 1 worksheet at different tim
I have an expense worksheet that contains different weeks. I want to print each week's expenses on a separate page without having to set up a new print range every time. This to allow the office person to print the new week's expenses for processing. Set-up a view you want, (i.e. hide rows and columns, etc.), jncludin having the "print area" defined. Then go on the menu bar go selec "VIEWS" - then - "CUSTOM VIEWS" and follow the directions. As far as know you can set as many different custom views as you want (dependin on the limits of your machine...

Internet connection not seen during activation
I'm trying to activate my Money Plux Deluxe (2008?), but after entering the key and clicking the 'activate' button, I get the following error dialog box: Money could not be activated. Please confirm your product key and check to be sure that your computer is connected to the Internet. I double checked the key, and it appears to be correct. My web browser appears to be getting pages correctly...I have a wired and wireless connections on this computer, and the Windows Vista firewall is on. Do I need to open up some special port for MS Money to talk to the mothership? ...

CAsyncSocket
My main thread creates a CAsyncSocket derived class and tries to connect to the server by calling the Connect method. Unfortunately, since CAsyncSocket is non-blocking, the OnConnect notification arrives as a message to the main window. But, I cannot continue processing until a successful connection has been established and I don't want to create a worker thread to initialize the socket. Is there any way I can process windows messages and wait until the OnConnect function returns with the connection status? "Rohit" <Rohit@discussions.microsoft.com> wrote in...

Version differences
Where can I find feature comparison between Visio 2003 Pro and Visio 2003 Standard? Thank you. http://www.microsoft.com/office/visio/prodinfo/editions.mspx al "WesZalewski" <WesZalewski@discussions.microsoft.com> wrote in message news:458907A5-2DF8-41C3-A3A0-035C1AD95F16@microsoft.com... > Where can I find feature comparison between Visio 2003 Pro and Visio 2003 > Standard? > Thank you. I said thank you. Thank you again. "Al Edlund" wrote: > http://www.microsoft.com/office/visio/prodinfo/editions.mspx > al > > "WesZalewski" &...

Problems connecting with clients
I've had to do a manual install on clients and I still can't get the server (DPM2010)to communicate with clients, and I think the problem is on the server (Windows 2008R2x64). The client error log for DPMRA says "host is unreachable" but the server firewall config shows all the DPM apps allowed through for the domain. Any pointers? Here are some guidelines on how to debug it, I am assuming that DPM and PSes are in a single domain(or having trust to each other's domain) and you have successfully attached the agent on DPM. 1. One quick way to isolat...

Entourage 2008 Web Services Edition cannot connect to Exchange Server 2007
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: Exchange I have been using Entourage 2008 to connect to our Exchange server since it's release (part of Office 2008) and I have recently followed the instructions to update it to the Web Services Edition. I am now unable to connect to my Exchange account with this version but as soon as I re-install the 'normal' version of Entourage 2008 everything works. <br><br>Is there something I need to enable on the Exchange 2007 server to allow the Web Services Edition to connect? ...

Connecting mac clients
Hi I have no prior experience with macs and unfortunately this new client has some macs that need connecting to the new sbs 2003 standard R2 dell server. Could someone please guide me to some easy steps to connect macs to sbs as client to access exchange emails (via apple mail or some such) and internet? Many Thanks Regards These links should help: Connecting a Macintosh running Mac OS 10.5 to an SBS 2003 Server http://simultaneouspancakes.com/Lessons/2007/10/28/connecting-a-macintosh-running-mac-os-105-to-an-sbs-2003-server/ SBS-Mac links (several pages) http://s...

CAsyncSocket::Receive and CAsyncSocket's threading...
Hi again, 1. Is CAsyncSocket::Receive a blocking function? 2. How is the IO Strategy for MFC's CAsyncSocket? 1 thread to do all stuff? Thanks again. pixelmana wrote: > Hi again, > 1. Is CAsyncSocket::Receive a blocking function? > 2. How is the IO Strategy for MFC's CAsyncSocket? 1 thread to do all stuff? > Thanks again. 1. No. "Async" means non-blocking. 2. CAsyncSocket sends you notifiction messages via the Windows message queue. These messages are just like button and mouse messages. CAsyncSocket turns them into calls to your derived class virtual fu...

Connection Schedule #2
We have all of our store computers setup on connection schedules. One of them is not connecting automatically and we have request a data upload to get the information off the server. Does anyone know why it would not be connecting and how we can fix the problem? There are a lot of reasons that would cause a store connection to fail - Here is where I would start: 1) Is the connection schedule defined in HQ Mgr?: HQ Mgr> Admin> Stores> Locate/Highlight store> Properties> Connection Schedule - is schedule according to your connection map? 2) Make sure stores connections are...

The Connections Tab is missing under the menu item Tools/Internet
RE: Microsoft Internet Explorer The Connections Tab is missing under the menu item Tools/Internet Options.../ anyone know why or how I can access connections in explorer. Chances are that your administrator has disabled the possibility to view this tab. BTW: Pls note that this forum is for questions related to the mail client Outlook and not for questions related to IE. Sandor Teglasy "zipzap" <zipzap@discussions.microsoft.com> wrote in message news:D6BB833F-EA5F-46D9-A1DA-CF54E76B1CFD@microsoft.com... > RE: Microsoft Internet Explorer > The Connections Tab is missin...

creating a connection to the current record
this is about code I have written behind the OnPrint event of a report's detail section... how would I go about creating a connection/relationship between the current record and the recordset(s) I have opened in the code behind the OnPrint; could you suggest what the code might be like? as always, thanks in advance, mark ...

Vlookup with difference between two data
Hi Every One, I hope you all are doing well, I required your help to resolve my issue in excel. On single worksheet i have two different sheet name as 1.IP Range 2. Result. Question: EG:IP Range Start IP End IP Area 192.168.1.4 195.182.254.254 AG 10.15.33.10 10.18.56.254 EMEA 10.128.33.5 10.132.40.60 AP Here it will Continued as well. On Result sheet i req...

CAsyncSocket
I have been unable to figure out a way to detect that the server that my client is talking to has lost its physical connection to the network. I have a simple server and client for debugging this problem. The server just accepts a connection and sends out a line of text every second. The client just connects and reads the socket, displaying each line as it comes in To test this, I fire up the two apps on different machines and let them run for a bit. Then I unplug the server machine's network cable. The client does not receive any notification that something is wrong (no OnClose noti...

Move mail from a different account
I am trying to set up a function that takes mail sent to my college account and re-routes it to my Outlook account? Can someone help me? ...

Outlooks 2003 connection probs w/ Exchange server 2003
Hello, I need some assistance. I have researched and researched but can't get some resolve on this problem. I helped a business move office locations. The business had a Win 2003 server that is the company web server and Exchange 2003 server. The network structure was a DSL internet connection, a Linux (generic) firewall, the 2003 server and a few client PCs on the network. In brief the move required a provider change so now the company is using a cable provider for phone and INET. When we finally got online we had some problems connecting. Not knowing the Linu...

display different image when dragging over something invalid
I have implemented a CTreeCtrl that allows drag and drop. It used a CImageList to creat the drag image and show the item being dragged. I would like to change the image when the cursor is over an invalid target, but I'm not exactly sure how. I know I need to do it in my OnMouseMove event. The CImageList is created with CTreeCtrl::CreateDragImage() I have looked over the CImageList docs and I see that there are several methods that sound promising, but I'm not having any success. If anyone has done this and can point me to a link or has a sample, that would be very cool. T...

moving data from one server to another with difference in collatio
Hi all I am facing a problem...which is summed up as follows...I am moving data from one server to another....they both have GP 8.0 and SQL 2000 installed on same plateform..however the SQL collation is different...the new server has Arabic collation which we want it to be like this...and the old server has English collation...so taking a backup and restoring it won't work...so I used DTS to transfer the data and I succeeded up to this step....however when I try to logon on GP with the ‘sa’ user...I get this error “Your SQL Server Login record is not a valid user record in great p...

Again with CAsyncSocket
I'm again with my attemp of implement a CAsyncSocket class to my project. I started from 0 again and have a class (MySocket:public CAsyncSocket) that has to manage the connections. The constructor creates the server socket: MySocket::MySocket() { //CAsyncSocket* pServer = new CAsyncSocket; this->numclients = 0; int nPort = 15000; int ret = this->Create( 15000 ); if( Listen()==FALSE ) { //ERROR } else { //NO ERROR } } This opens my server and starts listening connections: void MySocket::OnAccept(int nErrorCode) { CAsyncSocket* client = new CAsync...

Change display units to different sizes
Good morning all. I'm trying to get a chart with 6 series' to display over a differen scale on the X axis, over different values. To be more clear (I'm not even sure how to say it) I have the value plotted between 0 and 650 (automatic). However, only 2 series hav values higher than 200. What I currently do is, have 2 identica charts, but change the display values to 0-200 and 200-Automatic. Is there anyway to make the first half of a chart display 0-200,and th second half display 200-Automatic maximum? Thanks for any help you can provide. -Bo -- Message posted from http:/...

Understanding CAsyncSocket-- need perspective.
I've written several successful applications using CAsyncSocket, both server side and client side. I'm having trouble getting my mind around what exactly is going on in CAsyncSocket with a client side connection- and what the preferred method of connection is. My trouble is this: I've written a very small, q & d app which instantiates a casyncsocket on the stack, does a create() with no parameters and connects to a server (not under my control-- often a public site on say, an html port *80)). The connection always fails with WSAEWOULDBLOCK which I understand... in theory. ...

Connecting Documents
I have a newsletter on Publisher, and I want to insert an ad that is also on Publisher. How do I insert one Publisher document into another? You wouldn't. You'd save the ad as an image and then place it into your Publlisher newsletter. Which version of Publisher are you using? -- ~~~~~~~~~~~~~~~~~~ Rob Giordano Microsoft MVP Expression Web "Samantha Jayne" <Samantha Jayne@discussions.microsoft.com> wrote in message news:2C6ABC0A-9031-421F-976F-525D1D92A776@microsoft.com... > I have a newsletter on Publisher, and I want to insert an ad that is also > ...

Limited or No Connectivity? I think DHCP or AFD is the root of the problem!
Hello guys, I'm facing a serious problem here: I've been trying to fix a computer here but I am just so stuck. First the PC was filled with viruses to the point that it wouldn't allow you to get on the internet without some scan popping up and without the page rerouting you to an antisoftware page to buy the product. I got rid of all of that.:) The pc had XP SP2, so all I wanted to do was upgrade to XP SP3 and get the critical updates and security so it could be more secure. Boy was that not easy. The 2 times I've tried installing SP3, I have not been able to g...