Function

GLibWin32error_message

Declaration [src]

gchar*
g_win32_error_message (
  gint error
)

Description [src]

Translate a Win32 error code into a human readable message.

The error code could be as returned by GetLastError() or WSAGetLastError().

The message is either language neutral, or in the thread’s language, or the user’s language, the system’s language, or US English (see documentation for FormatMessage()). The returned string is in UTF-8.

If a human readable message cannot be found for the given error, an empty string is returned.

Parameters

error

Type: gint

Win32 error code.

Return value

Type: gchar*

Newly-allocated error message.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.