jdarpinian / decoder-issues

Issue tracker for Decoder error lookup tool.
2 stars 0 forks source link

Add Win32 GetLastError() codes #2

Closed ProgramMax closed 1 year ago

ProgramMax commented 1 year ago

I tried calling RemoveMenu() with an invalid ID (2nd param). (I was looking at the old memory before a vector resized. Whoops.) RemoveMenu() returns a BOOL indicating its failure, to be followed up with a call to GetLastError().

The error value I was given was 3435921410.

ProgramMax commented 1 year ago

In case others want this or it isn't really worth adding: auto error_code = HRESULT_FROM_WIN32(GetLastError()); returned 0x800705b0, which Decoder does recognize as "ERROR_MENU_ITEM_NOT_FOUND: A menu item was not found."

jdarpinian commented 1 year ago

Huh I thought I had the Win32 codes in there. I'll take a look.

jdarpinian commented 1 year ago

The Win32 code for ERROR_MENU_ITEM_NOT_FOUND is 1456 (0x5B0), which is present. HRESULT_FROM_WIN32(3435921410) does not produce 0x800705b0, so I think that value must have come from somewhere else. Maybe a misleading garbage value from the debugger when debugging an optimized build, or memory corruption, or similar?