int GetLastError()
Return values
The last error code generated by a call to a library function. The error code is a standard windows error code.
Remarks
The SetLastError can be used to clear the current Windows error code before calling a function.sds