daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest May 17th, 2018 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. QString WindowsUtils::formatMessage(unsigned long msg){
  2.     const DWORD size = 1024;
  3.     WCHAR buffer[size];
  4.     qDebug() << "status: " << msg;
  5.     DWORD res = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_MAX_WIDTH_MASK, 0, msg, 0, buffer, size, 0);
  6.     if (res == NULL){
  7.         alLog(QString("FormatMessage failed : %1").arg(GetLastError()));
  8.     }
  9.     return QTBASE_TCHAR_TO_QSTRING(buffer);
  10. }
RAW Paste Data
Top