def format_system_message(errno):
<EOL>ALLOCATE_BUFFER = <NUM_LIT><EOL>FROM_SYSTEM = <NUM_LIT><EOL>flags = ALLOCATE_BUFFER | FROM_SYSTEM<EOL>source = None<EOL>message_id = errno<EOL>language_id = <NUM_LIT:0><EOL>result_buffer = ctypes.wintypes.LPWSTR()<EOL>buffer_size = <NUM_LIT:0><EOL>arguments = None<EOL>bytes = ctypes.windll.kernel32.FormatMessageW(<EOL>flags,<EOL>source,<EOL>message_id,<EOL>language_id,<EOL>ctypes.byref(result_buffer),<EOL>buffer_size,<EOL>arguments,<EOL>)<EOL>handle_nonzero_success(bytes)<EOL>message = result_buffer.value<EOL>ctypes.windll.kernel32.LocalFree(result_buffer)<EOL>return message<EOL>
Call FormatMessage with a system error number to retrieve
the descriptive error message.