This article is from the Programming VCOMM FAQ, by email@example.com (Taed Nelson) with numerous contributions by others.
The description for dwEvents is wrong (a cut-and-paste error). It should be
something like "The location where the previous port event flags should be
returned." It could be copied from _VCOMM_GetCommEventMask.
There is some question on whether the previous events should be returned in
dwEvents as-is, or if they should be masked with dwMask. Serial.vxd does not
mask them, and the _VCOMM_GetCommEventMask description implies that they
should not be masked. On the other hand, that does not seem to match the
spirit of this function. This should be spelled out in the documentation. It
is mentioned in the Knowledge Base article Q81143, "DOCERR:
Get/SetCommEventMask Functions Documented Incorrectly", but that covers the
The VtoolsD documentation specifically states that they should be masked.
"The port object must set flags at the DWORD location pointed to by pEvents to
indicate which of the events specified by the mask have occurred".