Programming, System Programming, Win32, C.
ExitSys(LPCTSTR lpszMsg, int status) { DWORD dwLastError = GetLastError(); LPTSTR lpszErr; if (FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwLastError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpszErr, 0, NULL)) { _ftprintf(stderr, TEXT("%s: %s"),