From bec112069344281cbf1c61ade2eb1b354780d074 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 25 Nov 2019 09:26:46 -0500 Subject: removed calls to GetOverlappedResultEx() and SetThreadDescription(), not available on windows 7 bumped to alpha7.1 --- src/loot.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/loot.cpp') diff --git a/src/loot.cpp b/src/loot.cpp index a7251965..47a70596 100644 --- a/src/loot.cpp +++ b/src/loot.cpp @@ -159,7 +159,15 @@ private: { DWORD bytesRead = 0; - if (!::GetOverlappedResultEx(m_stdout.get(), &m_ov, &bytesRead, PipeTimeout, FALSE)) { + const auto r = WaitForSingleObject(m_readEvent.get(), PipeTimeout); + + if (r == WAIT_FAILED) { + const auto e = GetLastError(); + log::error("WaitForSingleObject in AsyncPipe failed, {}", formatSystemMessage(e)); + return {}; + } + + if (!::GetOverlappedResult(m_stdout.get(), &m_ov, &bytesRead, FALSE)) { const auto e = GetLastError(); switch (e) @@ -490,8 +498,6 @@ const Loot::Report& Loot::report() const void Loot::lootThread() { - ::SetThreadDescription(GetCurrentThread(), L"loot"); - try { m_result = false; -- cgit v1.3.1