mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 06:36:42 +00:00
- Implement GetCommProperties (Saveliy Tretiakov <saveliyt@mail.ru>)
- Remove a test in GetCommState that shouldn't exist svn path=/trunk/; revision=14251
This commit is contained in:
parent
e5d49d1493
commit
28a24e8079
1 changed files with 12 additions and 10 deletions
|
@ -946,14 +946,15 @@ GetCommModemStatus(HANDLE hFile, LPDWORD lpModemStat)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOL
|
BOOL
|
||||||
STDCALL
|
STDCALL
|
||||||
GetCommProperties(HANDLE hFile, LPCOMMPROP lpCommProp)
|
GetCommProperties(HANDLE hFile, LPCOMMPROP lpCommProp)
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
DWORD dwBytesReturned;
|
||||||
return FALSE;
|
return DeviceIoControl(hFile, IOCTL_SERIAL_GET_PROPERTIES, 0, 0,
|
||||||
|
lpCommProp, sizeof(COMMPROP), &dwBytesReturned, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -982,14 +983,15 @@ GetCommState(HANDLE hFile, LPDCB lpDCB)
|
||||||
DPRINT("ERROR: GetCommState() - NULL DCB pointer\n");
|
DPRINT("ERROR: GetCommState() - NULL DCB pointer\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (lpDCB->DCBlength != sizeof(DCB)) {
|
|
||||||
DPRINT("ERROR: GetCommState() - Invalid DCB size\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// DPRINT(" GetCommState() CALLING DeviceIoControl\n");
|
lpDCB->DCBlength = sizeof(DCB);
|
||||||
// result = DeviceIoControl(hFile, IOCTL_SERIAL_GET_COMMSTATUS, NULL, 0, NULL, 0, &dwBytesReturned, NULL);
|
|
||||||
// DPRINT(" GetCommState() DeviceIoControl returned %d\n", result);
|
/* FIXME: need to fill following fields (1 bit):
|
||||||
|
* fBinary: binary mode, no EOF check
|
||||||
|
* fParity: enable parity checking
|
||||||
|
* fOutX : XON/XOFF out flow control
|
||||||
|
* fInX : XON/XOFF in flow control
|
||||||
|
*/
|
||||||
|
|
||||||
result = DeviceIoControl(hFile, IOCTL_SERIAL_GET_BAUD_RATE,
|
result = DeviceIoControl(hFile, IOCTL_SERIAL_GET_BAUD_RATE,
|
||||||
NULL, 0, &BaudRate, sizeof(BaudRate),&dwBytesReturned, NULL);
|
NULL, 0, &BaudRate, sizeof(BaudRate),&dwBytesReturned, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue