| 82 | } |
| 83 | |
| 84 | void w_WriteFile(HANDLE hFile, LPCVOID lpBuffer, DWORD dwNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped) |
| 85 | { |
| 86 | if (!WriteFile(hFile, lpBuffer, dwNumberOfBytesToWrite, lpNumberOfBytesWritten, lpOverlapped)) |
| 87 | { |
| 88 | |
| 89 | /* file flag overlapped wont return true, yet the operation wont fail */ |
| 90 | if (lpOverlapped) |
| 91 | { |
| 92 | if (GetLastError() == ERROR_IO_PENDING) |
| 93 | { |
| 94 | return; |
| 95 | } |
| 96 | } |
| 97 | throw std::runtime_error(GetLastErrorString("WriteFile", GetLastError())); |
| 98 | } |
| 99 | |
| 100 | } |
| 101 | |
| 102 | std::shared_ptr<HANDLE> w_CreateJobObject(LPSECURITY_ATTRIBUTES lpJobAttributes, LPWSTR lpName) |
| 103 | { |
no test coverage detected