MCPcopy Create free account
hub / github.com/dirkvranckaert/AndroidDecompiler / displayLastError

Method displayLastError

astyle/src/astyle_main.cpp:791–808  ·  view source on GitHub ↗

* WINDOWS function to display the last system error. */

Source from the content-addressed store, hash-verified

789 * WINDOWS function to display the last system error.
790 */
791void ASConsole::displayLastError()
792{
793 LPSTR msgBuf;
794 DWORD lastError = GetLastError();
795 FormatMessage(
796 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
797 NULL,
798 lastError,
799 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
800 (LPSTR) &msgBuf,
801 0,
802 NULL
803 );
804 // Display the string.
805 (*_err) << "Error (" << lastError << ") " << msgBuf << endl;
806 // Free the buffer.
807 LocalFree(msgBuf);
808}
809
810/**
811 * WINDOWS function to get the current directory.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected