Re: GetDefaultCommConfig fails for "\\\\.\\COM15"
- From: "Doron Holan [MS]" <doronh@xxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 22 Apr 2006 16:24:15 -0700
they are stored where GetdefaultCommConfig can find them.
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tosca" <tb@xxxxxxxx> wrote in message
news:uIW4n$UZGHA.1580@xxxxxxxxxxxxxxxxxxxxxxx
Jochen Kalmbach [MVP] wrote:
Hi Tosca!Well the user might configure the com port using the _device manager_,
default comm config is a very legacy concept. every app that i know
of that uses a com port just sets the port to its own config b/c it
knows best.
OK, but how do I convert a devicename from "\\\\.\\COM15" TO "COM15" and
make GetDefaultCommConfig accept it even if it is not below COM9?
AFAIK, what Doron wanted to say is:
It makes absolutely no sence to get the "default" values. You should set
every member ob the DCB structure explicit!
and than once again in my program. Actually he'd have to do that every
time he installs my program or any other compatible program that uses
the same com port that probably he's got the same device hooked to it.
Fine, that's what I'll do.
I know of some applications which had used the "GetDefaultCommConfig"
and they wounderd why their app works on some machine and on other not.
The problem was, that they implicit used different settings for the DCB
because the called "GetDefaultCommConfig"...
So please: never call "GetDefaultCommConfig" nor "GetCommState" to
initialize your serial port!
Do you know the com port settings configured in _device manager_ are
stored? I could read them from the source.
Yes, CreateFile opens COM ports COM9 and up with a syntax like this:
Is it possible to open the port via CreateFile?
"\\\\.\\COM???".
And GetDefaultCommConfig does not. I must use "COM1-9" for it.
My problem is that this syntax is not supported by all communication
functions.
Sorry, I lied, I don't care about it. Just if someone could send a word
to Microsoft that GetDefaultCommConfig fails for "\\\\.\\COM15".
//Tosca
.
- Follow-Ups:
- References:
- GetDefaultCommConfig fails for "\\\\.\\COM15"
- From: Tosca
- Re: GetDefaultCommConfig fails for "\\\\.\\COM15"
- From: Doron Holan [MS]
- Re: GetDefaultCommConfig fails for "\\\\.\\COM15"
- From: Tosca
- Re: GetDefaultCommConfig fails for "\\\\.\\COM15"
- From: Jochen Kalmbach [MVP]
- Re: GetDefaultCommConfig fails for "\\\\.\\COM15"
- From: Tosca
- GetDefaultCommConfig fails for "\\\\.\\COM15"
- Prev by Date: Re: Forcing data into RAM memory only?
- Next by Date: Re: Re:What's the longest time before Windows flushes data to disk?
- Previous by thread: Re: GetDefaultCommConfig fails for "\\\\.\\COM15"
- Next by thread: Re: GetDefaultCommConfig fails for "\\\\.\\COM15"
- Index(es):
Relevant Pages
|