Step Into C · Lesson 23 · Windows C
Errors & Handles
GetLastError and FormatMessage, the two "invalid handle" values, HRESULT, and handle lifetimes.
- ~35 minreading and coding
- 4missions
- membersaccess
- Win32real Windows API
Part of Step Into C. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.
Win32 grew over 30 years, and different parts report errors differently:
In this lesson
- Four ways to say "it failed"
- GetLastError and FormatMessage
- The two invalid handles
- HRESULT in one picture
- Handles
Missions
- Explain an error
- NULL or INVALID_HANDLE_VALUE?
- Take an HRESULT apart
- One object, two handles