Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QString WindowsUtils::formatMessage(unsigned long msg){
- const DWORD size = 1024;
- WCHAR buffer[size];
- qDebug() << "status: " << msg;
- DWORD res = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_MAX_WIDTH_MASK, 0, msg, 0, buffer, size, 0);
- if (res == NULL){
- alLog(QString("FormatMessage failed : %1").arg(GetLastError()));
- }
- return QTBASE_TCHAR_TO_QSTRING(buffer);
- }
Add Comment
Please, Sign In to add comment