GetLastError

E724275

GetLastError is a Windows API function that retrieves the calling thread’s most recent error code, commonly used for diagnosing failures in system and application calls.

Try in SPARQL Jump to: Statements Referenced by

Statements (30)

Predicate Object
instanceOf Windows API function
availableOn Windows desktop applications
Windows server applications
belongsToLibrary Kernel32.dll
callingConvention stdcall
category error handling API
declaredInHeader windows.h
definedIn Windows API NERFINISHED
documentationURL https://learn.microsoft.com/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror
errorCodesDefinedIn WinError.h NERFINISHED
errorCodesInterpretedBy FormatMessage NERFINISHED
errorCodeSource per-thread last-error code maintained by the system
exportedBy Kernel32.dll NERFINISHED
language C
C++
mustBeCalledAfter failing Windows API function
relatedFunction FormatMessage NERFINISHED
SetLastError
WSAGetLastError NERFINISHED
requires including windows.h in source code
retrieves calling thread’s last-error code value
returnsNonZeroMeaning an error code indicating the last error
returnsZeroMeaning no extended error information is available
returnType DWORD
targetPlatform Microsoft Windows NERFINISHED
threadLocal true
threadSafetyNote last-error code is maintained per thread, not per process
usedFor diagnosing failures in Windows API calls
diagnosing failures in application calls that use Win32 API
diagnosing failures in system calls

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

Kernel32 exportsFunction GetLastError