DWORD GetLastError(VOID) |
The GetLastError function returns the most recent error code set by a Win32 function call.
This function has no parameters.
The return value is the most recent error code set by a Win32 function in the current thread.
An application should call this function immediately after a Win32 function call fails (typically indicated by returning FALSE, NULL or -1) to determine the cause of the failure.
The last error code value is maintained on a per-thread basis, so multiple threads do not overwrite each other's last error code value.
SetLastError