---
name: "CoWaitForMultipleHandles"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/CoWaitForMultipleHandles"
---

# CoWaitForMultipleHandles(3w)

## NAME

**CoWaitForMultipleHandles** (OLE32.@)

## SYNOPSIS

HRESULT CoWaitForMultipleHandles\
  (\
   DWORD    *dwFlags*,\
   DWORD    *dwTimeout*,\
   ULONG    *cHandles*,\
   LPHANDLE *pHandles*,\
   LPDWORD  *lpdwindex*\
  )

## DESCRIPTION

Waits for one or more handles to become signaled.

## PARAMS

*dwFlags* **\[In\]**  Flags. See notes.

*dwTimeout* **\[In\]**  Timeout in milliseconds.

*cHandles* **\[In\]**  Number of handles pointed to by *pHandles*.

*pHandles* **\[In\]**  Handles to wait for.

*lpdwindex* **\[Out\]**  Index of handle that was signaled.

## RETURNS

**Success:** **S\_OK**.

**Failure:** **RPC\_S\_CALLPENDING** on timeout.

## NOTES

The *dwFlags* parameter can be zero or more of the following: \
\
  COWAIT\_WAITALL - Wait for all of the handles to become signaled.\
\
  COWAIT\_ALERTABLE - Allows a queued APC to run during the wait.

## SEE ALSO

MsgWaitForMultipleObjects, WaitForMultipleObjects.

## IMPLEMENTATION

Declared in **"objbase.h"**.

Implemented in **"dlls/ole32/compobj.c"**.

Debug channel **"ole"**.
