🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4750

Re: # Send Data to COM

#4750
From: Pedram
Date: Tue, 29 Nov 2005 07:50
24 lines
1739 bytes
Yes you right
but my problem is how to set the properties like baud-rate, stop bit, etc
...
for example is there any sample to show me how could I send "Hello Port" to
the COM1?
Thx @};-

"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: <438c081d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed3.newsreader.com!newsreader.com!yellow.newsread.com!netaxs.com!newsread.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <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: Tue, 29 Nov 2005 11:20:46 +0330
Lines: 26
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: 80.191.114.144
Message-ID: <438c081d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1133250589 80.191.114.144 (28 Nov 2005 23:49:49 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed3.newsreader.com!newsreader.com!yellow.newsread.com!netaxs.com!newsread.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail