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

# WaitCommEvent(3w)

## NAME

**WaitCommEvent** (KERNEL32.@)

## SYNOPSIS

BOOL WaitCommEvent\
  (\
   HANDLE       *hFile*,\
   LPDWORD      *lpdwEvents*,\
   LPOVERLAPPED *lpOverlapped*\
  )

## PARAMS

*hFile* **\[In\]**  handle of comm port to wait for.

*lpdwEvents* **\[Out\]**  event(s) that were detected.

*lpOverlapped* **\[In/Out\]**  for Asynchronous waiting.

## DESCRIPTION

Wait until something interesting happens on a **COMM** port. Interesting things (events) are set by calling SetCommMask before this function is called.

## RETURNS

**TRUE** if successful **FALSE** if failure.

The set of detected events will be written to \*lpdwEventMask **ERROR\_IO\_PENDING** will be returned the overlapped structure was passed.

**BUGS:** Only supports **EV\_RXCHAR** and **EV\_TXEMPTY**

## IMPLEMENTATION

Declared in **"winbase.h"**.

Implemented in **"dlls/kernel32/comm.c"**.

Debug channel **"comm"**.
