<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Why does the function WSASetLastError exist?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx</link><description>Because Winsock was originally written for 16-bit Windows.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Why does the function WSASetLastError exist?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx#464118</link><pubDate>Mon, 12 Sep 2005 22:18:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:464118</guid><dc:creator>Aaron</dc:creator><description>Thats how my company succeeds in business too.  Just keep getting other people to lower the bar until something bad is tolerable :P&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=464118" width="1" height="1"&gt;</description></item><item><title>re: Why does the function WSASetLastError exist?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx#463368</link><pubDate>Sat, 10 Sep 2005 16:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:463368</guid><dc:creator>mike</dc:creator><description>Of all the ugly things in Windows this is one of the most tolerable.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=463368" width="1" height="1"&gt;</description></item><item><title>re: Why does the function WSASetLastError exist?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx#462892</link><pubDate>Fri, 09 Sep 2005 16:23:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:462892</guid><dc:creator>Larry Osterman [MSFT]</dc:creator><description>Goran, why do you think he looked at the history for this?  It's HIGHLY unlikely this stuff is in the source code history.&lt;br&gt;&lt;br&gt;Instead, he probably just figured it out because he understands the context in which the APIs were developed (knowing Raymond, he most likely also went to the guys who wrote winsock (two of them are still at MS) and confirmed it).&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462892" width="1" height="1"&gt;</description></item><item><title>Leave your SourceSafe alone!</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx#462840</link><pubDate>Fri, 09 Sep 2005 12:05:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:462840</guid><dc:creator>Goran</dc:creator><description>:-))&lt;br&gt;&lt;br&gt;I think somebody from Redmond sys administration is going to kill Raymond's VSS account! I mean, how long will they put up with him wandering through VSS history to look for trivia of this kind?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462840" width="1" height="1"&gt;</description></item><item><title>re: Why does the function WSASetLastError exist?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx#462607</link><pubDate>Fri, 09 Sep 2005 00:48:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:462607</guid><dc:creator>Yaytay</dc:creator><description>456,&lt;br&gt;You are right, thank you, now I can ignore it with impunity.&lt;br&gt;Nothing about it in MSDN though.&lt;br&gt;&lt;br&gt;So which is definitive, MSDN or the Winsock 2 spec?&lt;br&gt;I would have thought that the comment in the Winsock spec is just a comment about a current implementation and that to be officially an alias for GetLastError it would need to say it in MSDN.&lt;br&gt;&lt;br&gt;Go on, prove me wrong, show me the dark and dingy corner of MSDN that says it.&lt;br&gt;Please.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462607" width="1" height="1"&gt;</description></item><item><title>re: Why does the function WSASetLastError exist?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx#462601</link><pubDate>Fri, 09 Sep 2005 00:33:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:462601</guid><dc:creator>Michael Dunn_</dc:creator><description>How did Win16 communicate errors, if there was no SetLastError (and, I assume, no GetLastError either)?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462601" width="1" height="1"&gt;</description></item><item><title>re: Why does the function WSASetLastError exist?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx#462590</link><pubDate>Fri, 09 Sep 2005 00:08:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:462590</guid><dc:creator>Aaron</dc:creator><description>Actually it looks kind of stupid even if you are aware of that.  &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462590" width="1" height="1"&gt;</description></item><item><title>re: Why does the function WSASetLastError exist?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx#462578</link><pubDate>Thu, 08 Sep 2005 23:45:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:462578</guid><dc:creator>456</dc:creator><description>Its documented in the WinSock 2 specification:&lt;br&gt;&lt;br&gt;&amp;quot;This function is implemented in WinSock 2 as an alias for the Win32 function GetLastError(), ...&amp;quot;&lt;br&gt;&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://paginas.fe.up.pt/~jmcruz/etc/sockets/winsock22.pdf"&gt;http://paginas.fe.up.pt/~jmcruz/etc/sockets/winsock22.pdf&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462578" width="1" height="1"&gt;</description></item><item><title>re: Why does the function WSASetLastError exist?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx#462550</link><pubDate>Thu, 08 Sep 2005 22:45:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:462550</guid><dc:creator>Yaytay</dc:creator><description>Sven's comments sums up what's annoying about WSAGetLastError - the fact that it isn't documented to return the same as GetLastError.&lt;br&gt;In all my experiments it does, and I suspect it just returns GetLastError() on Win32, but it ought to be documented.&lt;br&gt;&lt;br&gt;More importantly, why are there a whole bunch of winhttp errors that don't work with FormatMessage?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462550" width="1" height="1"&gt;</description></item><item><title>re: Why does the function WSASetLastError exist?</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/09/08/462402.aspx#462523</link><pubDate>Thu, 08 Sep 2005 21:50:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:462523</guid><dc:creator>Sven</dc:creator><description>And GetLastError returns the same error code as WSAGetLastError?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=462523" width="1" height="1"&gt;</description></item></channel></rss>