<?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>GetLastError and managed code</title><link>http://blogs.msdn.com/adam_nathan/archive/2003/04/25/56643.aspx</link><description>In the Win32 world, calling the GetLastError API is often the mechanism to get additional error information when an API call fails. When calling these same Win32 APIs in managed code via PInvoke or via "It Just Works (IJW)" in managed C++, the rules are</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>RE: GetLastError and managed code</title><link>http://blogs.msdn.com/adam_nathan/archive/2003/04/25/56643.aspx#56644</link><pubDate>Sat, 26 Apr 2003 21:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:56644</guid><dc:creator>David Pickett</dc:creator><description>&amp;gt; Even if an API supports SetLastError/GetLastError, the value returned by GetLastError is only meaningful if the API you just called actually fails.&amp;#160; How that failure is indicated depends on the API.

Except for a couple of braindead API/situation combinations, like Impersonate* with the new SeImpersonatePrivilege: the API can return a success code even if it fails due to lack of privilege, leaving you with only an identification token.  Then you have to call GetLastError () to find out why the nominally-successful API call failed....</description></item><item><title>re: What are the advantages of C# over VB.NET and vice versa?</title><link>http://blogs.msdn.com/adam_nathan/archive/2003/04/25/56643.aspx#89835</link><pubDate>Mon, 15 Mar 2004 19:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89835</guid><dc:creator>C# Frequently Asked Questions</dc:creator><description /></item><item><title>Euphemos  &amp;raquo; Blog Archive   &amp;raquo; HRESULTs and Win32 Error Codes Introduction</title><link>http://blogs.msdn.com/adam_nathan/archive/2003/04/25/56643.aspx#8326150</link><pubDate>Wed, 19 Mar 2008 22:35:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8326150</guid><dc:creator>Euphemos  » Blog Archive   » HRESULTs and Win32 Error Codes Introduction</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blog.euphemos.com/2005/04/18/hresults-and-win32-error-codes-introduction/"&gt;http://blog.euphemos.com/2005/04/18/hresults-and-win32-error-codes-introduction/&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>