Skip to content
Snippets Groups Projects
  1. Mar 25, 2015
    • Nat Goodspeed's avatar
      Add logic to attempt to look up large Windows negative return codes. · d24c59bb
      Nat Goodspeed authored
      A large negative return code doesn't do a human reader any good, even for
      lookup purposes, because Microsoft's lookup tables list the hex representation
      of that integer. So at least format the return code as hex.
      Going further, we've captured the content of the web page
      https://msdn.microsoft.com/en-us/library/cc704588.aspx
      as windows-rcs.html. If we can parse that file, and if we understand the
      structure of its table entries, and if the hex form of the actual return code
      is in fact listed there, we can display the symbol name and description as
      well as the hex return code.
      All those maybes are to support refreshing the file from the URL above (or
      wherever it might get moved) from time to time. Later versions of that file
      might change in unexpected ways.
      If we can't look up the hex rc, oh well, just display that to the user instead
      of crumping.
      d24c59bb
Loading