Saturday, January 21, 2023

Getting the last error code while debugging even if the Win32 API returned value was not saved

Getting the last error code while debugging even if the Win32 API returned value was not saved

It is not uncommon that a Win32 API call return value is not checked in code. This information can prove to be very invaluable while debuging. Fortunately, Visual Studio saves pseudovariables which includes the value normally returned by GetLastError function. To view what would have returned by GetLastError use $err,hr in the Watch window.
Refs:
Visual Studio Pseudovariables
Tags: Visual Studio, CPP

No comments:

Fedora install screen chronicle

Fedora install screen chronicle Below are links to Fedora installation screens. It is interesting to see how it has evolved over time. Fe...