VC++ 在Watch窗口显示GetLastError值以及详细信息

  You can display the value GetLastError() will return by putting "@err" in your watch window.

  You can see the error message associated with that value by putting "@err,hr" in your watch window.

  If you've placed an HRESULT in a variable, adding ",hr" to the variable name in the watch window will display the associated text.

       

   

  The Watch windows or the QuickWatch dialog support some special (debugger-recognized) variables called pseudovariables.

  The documented one include:

  • $tid – the thread ID of the current thread
  • $pid – the process ID
  • $cmdline – the command line string that launched the program
  • $user – information for the account running the program
  • $registername – displays the content of the register registername

  更详细:https://msdn.microsoft.com/en-us/library/ms164891.aspx

原文地址:https://www.cnblogs.com/MakeView660/p/8442725.html