# Error user defined functions Reference

Below is a complete list of the user defined functions available in AutoIt. Click on a user defined function name for a detailed description.

When using them you need to add a #include <WinAPIError.au3>.

User Defined Function | Description
--- | ---
_WinAPI_Beep | Generates simple tones on the speaker
_WinAPI_FormatMessage | Formats a message string
_WinAPI_GetErrorMessage | Retrieves a text error message for the specified system error code
_WinAPI_GetLastError | Returns the calling thread's lasterror code value
_WinAPI_GetLastErrorMessage | Returns the calling threads last error message
_WinAPI_MessageBeep | Plays a waveform sound
_WinAPI_MsgBox | Displays a message box with wider margin than original
_WinAPI_SetLastError | Sets the last-error code for the calling thread
_WinAPI_ShowError | Displays an error message box with an optional exit
_WinAPI_ShowLastError | Shows the last error code and message
_WinAPI_ShowMsg | Displays an "Information" message box