Windows / LSTATUS
LSTATUS
The LSTATUS codes are legacy error codes used in some Windows functions.
The 'L' in LSTATUS connotates the Windows LONG
data type,
defined in winreg.h as LONG
under WinNT.h.
The LONG
data type is defined as the C long
data type.
Functions returning LSTATUS codes, such as the low-level Windows Registry API
(winreg.h), intially introduced in Window 3.1 (1992), and the
Windows Shell API (Shlwapi.h), do not seem to set the thread's last error code
(for example, using SetLastError
), resulting in confusing
GetLastError
results.
These error codes can also be used directly for FormatMessage
with FORMAT_MESSAGE_FROM_SYSTEM
.