User manual

PCI-1680U/1682U User Manual 42
4.3.7 GetCommMask
Users can call GetCommMask to get event type set in SetCommMask.
Syntax
BOOL GetCommMask(
HANDLE hDevice,
LPDWORD lpEvtMask
);
Parameters
Return Value
Successful: return non-zero values. Unsuccessful: return zero value. Please call Get-
LastError function.
Example
DWORD dwMask = 0;
BOOL bSuccess = GetCommMask(hDevice, &dwMask);
See Also
SetCommMask
4.3.8 WaitCommEvent
After calling SetCommMask to set event, users should also call WaitCommEvent
function to wait event.
Syntax
BOOL WaitCommEvent(
HANDLE hDevice,
LPDWORD lpEvtMask,
LPOVERLAPPED lpOverlapped
);
Parameters
Name Direction Description
hDevice Input Handle of the device which was opened.
lpEvtMask Output Store event type which return from drivers.
Name Direction Description
hDevice Input Handle of the device which was opened.
lpEvtMask Output Event type.
lpOvelapped Output
If CreateFile uses asynchronous open, asynchronous oper-
ation must be supported here. Please refer to MSDN for
detailed instruction to asynchronous open.
*Note In WINDOWS CE,set to NULL.