| 104 | #define SEMAPHORE_MAX 100 |
| 105 | |
| 106 | static 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 | |
| 123 | bool WizLockedFile::lock(LockMode mode, bool block) |
| 124 | { |
no test coverage detected