[idd] win32: use wait result constants

Use the documented Win32 wait constants throughout the pipe, clipboard,
and input workers instead of local numeric aliases.

Select the WDK NT-status definitions before including Windows headers.
Include wudfwdm.h privately in the affected translation units so UMDF 2
provides NTSTATUS without exposing WDF headers through LGCommon's public
interface to the desktop Helper.
This commit is contained in:
Geoffrey McRae
2026-08-15 14:54:29 +10:00
parent cecd4b6f48
commit 6a590e343a
8 changed files with 46 additions and 30 deletions

View File

@@ -18,8 +18,12 @@
* Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <ntstatus.h>
#include "ipc/CInputPipeServer.h"
#include <wudfwdm.h>
#include "config/CSettings.h"
#include "CDebug.h"
#include "CSRWLock.h"
@@ -29,8 +33,6 @@
CInputPipeServer g_inputPipeServer;
static constexpr DWORD WAIT_FIRST_OBJECT_VALUE = 0;
bool CInputPipeServer::Init()
{
DeInit();
@@ -564,9 +566,9 @@ void CInputPipeServer::Thread()
{
const DWORD wait = WaitForMultipleObjects(
_countof(handles), handles, FALSE, INFINITE);
if (wait == WAIT_FIRST_OBJECT_VALUE)
if (wait == WAIT_OBJECT_0)
break;
if (wait != WAIT_FIRST_OBJECT_VALUE + 1)
if (wait != WAIT_OBJECT_0 + 1)
{
DEBUG_ERROR_HR(GetLastError(), "LGInput sender wait failed");
break;