Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 98 of file utility.cpp.
Referenced by StartMenu::ActivateEntry(), MainFrameBase::Command(), MDIMainFrame::Command(), ShellEntry::launch_entry(), and launch_file().
{ PTSTR msg; if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, 0, error, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PTSTR)&msg, 0, NULL)) { LOG(FmtString(TEXT("display_error(%#x): %s"), error, msg)); SetLastError(0); MessageBox(hwnd, msg, TEXT("ROS Explorer"), MB_OK); if (GetLastError() == ERROR_INVALID_WINDOW_HANDLE) MessageBox(0, msg, TEXT("ROS Explorer"), MB_OK); } else { LOG(FmtString(TEXT("Unknown Error %#x"), error)); FmtString msg(TEXT("Unknown Error %#x"), error); SetLastError(0); MessageBox(hwnd, msg, TEXT("ROS Explorer"), MB_OK); if (GetLastError() == ERROR_INVALID_WINDOW_HANDLE) MessageBox(0, msg, TEXT("ROS Explorer"), MB_OK); } LocalFree(msg); }