This function fills in a device-control block (a DCB structure) with the current control settings for a specified communication device.
At a Glance
Header file: | Winbase.h |
Windows CE versions: | 1.0 and later |
Syntax
BOOL GetCommState(HANDLE hFile, LPDCB lpDCB);
Parameters
hFile
[in] Handle to the communication device. The CreateFile function returns this handle.
lpDCB
[out] Long pointer to the DCB structure in which the control settings data is returned.
Return Values
Nonzero indicates success. Zero indicates failure. To get extended error data, call GetLastError.
See Also