MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / errorCodeToString

Function errorCodeToString

src/share/WizLockedFile.cpp:106–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104#define SEMAPHORE_MAX 100
105
106static QString errorCodeToString(DWORD errorCode)
107{
108 QString result;
109 char *data = 0;
110 FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
111 0, errorCode, 0,
112 (char*)&data, 0, 0);
113 result = QString::fromLocal8Bit(data);
114 if (data != 0)
115 LocalFree(data);
116
117 if (result.endsWith("\n"))
118 result.truncate(result.length() - 1);
119
120 return result;
121}
122
123bool WizLockedFile::lock(LockMode mode, bool block)
124{

Callers 3

lockMethod · 0.85
unlockMethod · 0.85
~WizLockedFileMethod · 0.85

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected