MCPcopy Create free account
hub / github.com/Skycoder42/QHotkey / formatWinError

Method formatWinError

QHotkey/qhotkey_win.cpp:286–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286QString QHotkeyPrivateWin::formatWinError(DWORD winError)
287{
288 wchar_t *buffer = NULL;
289 DWORD num = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
290 NULL,
291 winError,
292 0,
293 (LPWSTR)&buffer,
294 0,
295 NULL);
296 if(buffer) {
297 QString res = QString::fromWCharArray(buffer, num);
298 LocalFree(buffer);
299 return res;
300 } else
301 return QString();
302}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected