🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Using CreateFile with a modem

#7348
From: Remy Lebeau (TeamB)
Date: Wed, 09 Feb 2005 18:28
25 lines
1963 bytes
"Joe Black" <JoeBlack@newsgroup.nospam> wrote in message
news:420a4069$1@newsgroups.borland.com...

> 1) Will the API functions GetCommState and SetCommState allow
> me to permanantly modify these settings, ie when I call close handle
> will they remain as above?

You cannot change the settings permanently.  You can, however, change them
for the duration of your session with the modem.  Every time you use
CreateFile() to open a port, you should call SetCommState() to set up the
session as you wish.  When you close the session later, there is no
guarantee that the settings will still be in place when you open the same
port again.

> 2) What do you need to pass to the CreateFile parameter  LPCTSTR
>       lpFileName, // pointer to name of the file
>
>     this is the first parameter, for comm ports it would be COM1.

You would specify "COM1".  The various lpFileName formats that CreateFile()
supports are listed in CreateFile()'s documentation.


Gambit
Technical Details
Message-ID: <420a556d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <420a4069$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7607afe9e9e2c05d
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <420a4069$1@newsgroups.borland.com>
Subject: Re: Using CreateFile with a modem
Date: Wed, 9 Feb 2005 10:28:07 -0800
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <420a556d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1107973485 68.69.17.41 (9 Feb 2005 10:24:45 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail