R.Wieser
2023-10-03 12:22:17 UTC
Hello all,
I'm in a bit of a catch-22 : I want to know which baudrates a(n USB to
serial) COM port supports *before* opening it, but the GetCommProperties
function needs an open COM port to be able to fetch that information. :-(
... Or is there a way to "open" a COM port for inspection only, not letting
an attached serial device know the COM port is ready for business.
I /imagine/ there is (opening the "control channel" to the involved device
driver), but in all my time I've never encountered anything describing how
to do it. So, I'm stuck.
Help please ?
-- second question:
GetCommProperties returns a COMMPROP structure* for which the MSDN page
defines speeds upto 128k bps. But when I use CommConfigDialog it shows me a
few specific speeds (230400, 460800, 921600) above it. Where do those come
from ?
*
https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-commprop
Regards,
Rudy Wieser
I'm in a bit of a catch-22 : I want to know which baudrates a(n USB to
serial) COM port supports *before* opening it, but the GetCommProperties
function needs an open COM port to be able to fetch that information. :-(
... Or is there a way to "open" a COM port for inspection only, not letting
an attached serial device know the COM port is ready for business.
I /imagine/ there is (opening the "control channel" to the involved device
driver), but in all my time I've never encountered anything describing how
to do it. So, I'm stuck.
Help please ?
-- second question:
GetCommProperties returns a COMMPROP structure* for which the MSDN page
defines speeds upto 128k bps. But when I use CommConfigDialog it shows me a
few specific speeds (230400, 460800, 921600) above it. Where do those come
from ?
*
https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-commprop
Regards,
Rudy Wieser