Returns the calling thread's lasterror code value
#include <WinAPIError.au3> _WinAPI_GetLastError ( )
@error and @extended are preserved on return.
_WinAPI_GetLastErrorMessage
Search GetLastError in MSDN Library.