win32api.FormatMessageW

PyUnicode = FormatMessageW(errCode)

Returns an error message from the system error file.

Parameters

errCode=0 : int

The error code to return the message for, If this value is 0, then GetLastError() is called to determine the error code.

Alternative Parameters

flags

Flags for the call. Note that FORMAT_MESSAGE_ALLOCATE_BUFFER and FORMAT_MESSAGE_ARGUMENT_ARRAY will always be added.

source

The source object. If flags contain FORMAT_MESSAGE_FROM_HMODULE it should be an int or PyHANDLE; if flags contain FORMAT_MESSAGE_FROM_STRING it should be a unicode string; otherwise it is ignored.

messageId

The message ID.

languageID

The language ID.

inserts

The string inserts to insert.

Win32 API References

Search for GetLastError at msdn, google or google groups.

Search for FormatMessage at msdn, google or google groups.