I’m probably saying nothing new to any seasoned Windows developer, but it was new to me: if you add a watch in VisualStudio for the value @ERR,hr
(no quotes) you get the human-readable error string for the error code that would be returned by GetLastError()
if you called it and then ran it through FormatMessage()
. I was amazingly happy to discover this little tidbit of functionality, since previously I had thought I had to look up the value on the MSDN System Error pages.
Want to comment on this post? Join the discussion! Email my public inbox.