Article View: borland.public.cppbuilder.nativeapi
Article #6272Re: Parity Bit have No Effect.......
From: Bob Gonder
Date: Tue, 31 May 2005 16:49
Date: Tue, 31 May 2005 16:49
35 lines
2089 bytes
2089 bytes
Ramy wrote: > >Hi, i init my com port as i showed in my last post, and i use > >My_DCB.Parity = SPACEPARITY; > >OR > >My_DCB.Parity = MARKPARITY; > >to try to set this bit to '0' or to '1', but no matter which of >this options i use, when i look on a scope device to see the >pulses that i transmit i don't see any change, it's looks exactly >the same for both 'SPACEPARITY' and 'MARKPARITY'. > >How can it be? Well, if you are still using this code: > my_DCB.Parity = MARKPARITY; > strcat( com_params, ":9600, N, 8, 1" ); > if ( !BuildCommDCB( com_params, &my_DCB ) ) // Fills DCB Structure with Com Values > return FAIL; Then, according to your own comments, you are overwriting my_DCB.Parity, and the other my_DCB settings with the results from BuildCommDCB(). Don't know why you would want to set the values twice in the first place. Choose one method (manual or BuildCommDCB() ) and use only that. > if ( !SetCommState( ComHndl, &my_DCB ) ) // Configures Com Port > return FAIL;
Technical Details
Message-ID:
<gu4p919ougmd71vo7hs649g486n3j525f0@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<429c92d6$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,821a5333e4c794bc X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Parity Bit have No Effect....... Date: Tue, 31 May 2005 09:49:51 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <gu4p919ougmd71vo7hs649g486n3j525f0@4ax.com> References: <429c92d6$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.154.209 X-Trace: newsgroups.borland.com 1117558189 67.77.154.209 (31 May 2005 09:49:49 -0700) Lines: 37 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail