title: How do I look up the proper Windows System Error Code to use in my application?
body: <p>I am writing a C# .NET 2.0 application wherein when a message is expected to be received via the <code>SerialPort</code>.  If the frame is not received (i.e. times out) or it is determined to be invalid, I need to set an error code using <code>SetLastError</code>.  Windows has a plethora of error codes.  Is there a simple tool or reference to help narrow down the proper error code to use?</p>
  
  <p><em><strong>ADDITIONAL INFO</em></strong></p>
  
  <p>While throwing an exception and handling it higher up the stack is my preference, that is not an option in this case because the application I am updating was not designed to take advantage of such a useful feature.</p>