carb::extras::getLastWinApiErrorMessage
Defined in carb/extras/Errors.h
-
inline std::string carb::extras::getLastWinApiErrorMessage()
(Windows only) Reads the value of
GetLastError()
and converts it to a human-readable string.Note
Unlike convertWinApiErrorCodeToMessage(), this function will keep the same error code consistent. A call to
GetLastError()
after calling this function will return the same value as prior to calling this function.- Returns
the string from convertWinApiErrorCodeToMessage()