title: DllImport - PreserverSig and SetLastError attributes
body: <p>On the MSDN I've found the following description for the two attributes:</p>
  
  <p><strong>PreserveSig</strong> Set the PreserveSig field to true to directly translate unmanaged signatures with HRESULT or retval values; set it to false to automatically convert HRESULT or retval values to exceptions. By default, the PreserveSig field is true.</p>
  
  <p><strong>SetLastError</strong> Enables the caller to use the Marshal.GetLastWin32Error API function to determine whether an error occurred while executing the method. In Visual Basic, the default is true (which adds some overhead); in C# and C++, the default is false.</p>
  
  <p>My question is: How these two relate to each other? Suppose I have PreserveSig set to 'false' - it means that I should have HRESULT converted to exception - if unmanaged function returns integer indicating that error or no error occured, how could this be translated to exception?</p>
  
  <p>Also why do I need to call GetLastWin32Error method if I somehow managed to extract the exception using PreserveSig?</p>
  
  <p>Kind regards
  PK</p>