Article View: borland.public.cppbuilder.nativeapi
Article #6195Re: Please help, Parity does Not Working Again........
From: Ramy
Date: Thu, 02 Jun 2005 07:56
Date: Thu, 02 Jun 2005 07:56
47 lines
2695 bytes
2695 bytes
"No, what I said was either build the DCB by hand or build it with the function call, but not both, then once it is built, use it in SetCommState()...... Well, now, this is at least the third time I'm telling you not to do that. BuildComDCB replaces all of your hard work up at the top, with whatever Bill Gates thinks is best for you. If you really need to use that function (and I don't think you do), then use it to set defaults, and *then* override them with your indiviual settings (such as fParity=1) IOW, you already set the baud rate, the parity settings, seems like everything has been set manually in my_DCB, and then you throw it all away with a call to BuildCommDCB() ?" Sorry but i just lose you somewhere.... i don't understand what you mean by "build the DCB by hand or build it with the function call", what is "by hand"? and what is "with the function call"? I'm using the following functions and in the following order - CreateFile(...); BuildCommDCB(...) SetCommState(...) SetCommTimeouts(...) What exactly do you say, that i can remove the call for the SetCommState() function? ( i prefer to use BuildCommDCB() becouse it's giving me much more control ). Also, when i tried to remove the call to BuildCommDCB() then the following function SetCommState() FAILS, do you know why? ANYWHAY, when i removed the call to SetCommState(), i still see the problem, and although that i set 'fParity' to '1', if i read the port data ( GetCommState ) right after the the calls for BuildCommDCB() and SetCommTimeouts() i see that 'fParity' is Zero again! and i still don't understand WHY ? "Change the N to the proper value. Not 100% sure about m and s, but probably N, O, E, M, S" Then it's exactly what i said in my post. Please advice, Ramy
Technical Details
Message-ID:
<429ebbbf$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<429ddcd0$1@newsgroups.borland.com> <hlrr9117ici0n26ua1vmn2odmbri4mornt@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,499887f6c1e08a34 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Ramy" <Ramy@NoMail.com> Sender: "Ramy" <Ramy@NoMail.com> Reply-To: "Ramy" <Ramy@NoMail.com> Subject: Re: Please help, Parity does Not Working Again........ Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 62.0.27.159 References: <429ddcd0$1@newsgroups.borland.com> <hlrr9117ici0n26ua1vmn2odmbri4mornt@4ax.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <429ebbbf$1@newsgroups.borland.com> Date: 2 Jun 2005 00:56:47 -0700 X-Trace: newsgroups.borland.com 1117699007 207.105.83.66 (2 Jun 2005 00:56:47 -0700) Lines: 48 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail