Article View: borland.public.cppbuilder.nativeapi
Article #4779Re: # Send Data to COM
From: Pedram
Date: Thu, 01 Dec 2005 09:26
Date: Thu, 01 Dec 2005 09:26
33 lines
2251 bytes
2251 bytes
The samples are talking about yo write a file to COM ports but my new hardware (electronic project) is designed for baud rate 9600 I dont know but when I use those source it doesn't work at all. I mean, I know how to write files to COM But I have to know how could I write a Character, and then a sery of characters to COM1 with baud rate 9600 and some other settings, the MSDN and other help files didn't tell me how , althouty DBC talks about Baudrates but It need some header files and I also don't like to know about DBC. Please :-) Please guide me to write a simple BCB5 source code. in this source I need to change my needed settings (baudrate etc...) and then write a character or a sery of it to COM1. Thanks to all. Pedram "Bob Gonder" <notbg@notmindspring.invalid> wrote in message news:k3tmo1lqum0cd2kc3ia6a2tr5gcnd8oea9@4ax.com... > Pedram wrote: > > >I have a hardware that is accepting these data and I test it by Windows > >Hyper Terminal, > >now I want to write the software for myself. > > What is it that you need to know? > > Use CreateFile() to open a COM port. > > Look in the help for DCB and GetCommState() and SetCommState() > > Use ReadFile and WriteFile to read/write to the COM port. > >
Technical Details
Message-ID:
<438ec31c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<438b18ee@newsgroups.borland.com> <k3tmo1lqum0cd2kc3ia6a2tr5gcnd8oea9@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,eed65ef52aa9d642 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Pedram" <irbus@remove-me-bonbon.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <438b18ee@newsgroups.borland.com> <k3tmo1lqum0cd2kc3ia6a2tr5gcnd8oea9@4ax.com> Subject: Re: # Send Data to COM Date: Thu, 1 Dec 2005 12:56:35 +0330 Lines: 35 Organization: Sepand Minoo X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2479.0006 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2479.0006 NNTP-Posting-Host: 217.219.57.121 Message-ID: <438ec31c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1133429532 217.219.57.121 (1 Dec 2005 01:32:12 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail