> Actually, you should check for 20x codes which mean success. > Other status codes (10x, 30x, 40x, and 50x) all have > predefined meanings. For example if you get a 503 (Service > Unavailable) error code, the above code mistakenly interprets > it as a success. The best check I can think of is: > > if ((dwStatusCode / 100) == 2) > /* success */; > else > /* failure */;
Thanks for that tweak to the code. Question: When I try to OpenURL, I put it in a TRY block, so if there was a problem, like no internet connection, it gets caught and the user notified of the error message. But if that call is OK and we end up with a valid CHttpFile pointer, we then check the status as mentioned. What I am getting at concerns the "failure"... At the moment I just say: "Unable to download information file. Contact software author." But should I maybe be showing some other text string, based on the value of the status code, and if so, is this system generated at all? Andrew This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding. _______________________________________________ msvc mailing list [email protected] See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
