Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2004

Tip: Looking for answers? Try searching our database.

Comm Port setup not complete

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PeteC - 04 May 2004 22:16 GMT
Hello

I am using a serial port to communicate with an embedded device. I am using CreateFile, WriteFile & ReadFile. It all works great until I run a VB6 application that uses the serial port. After I run the VB6 application, the ReadFile no longer waits for a character, it simply falls through. If I open HyperTerm and close it, again my app works.

CreateFile, GetCommState, SetupComm, SetCommState & PurgeComm all return successfully. Any ideas

Thanks
Pete
William DePalo [MVP VC++] - 04 May 2004 23:33 GMT
> I am using a serial port to communicate with an
> embedded device. I am using CreateFile, WriteFile
[quoted text clipped - 3 lines]
> a character, it simply falls through. If I open
> HyperTerm and close it, again my app works.

> CreateFile, GetCommState, SetupComm, SetCommState & PurgeComm all return successfully. Any ideas?

I would suggest that you take a look at SetCommTimeouts(), too.

If that fails you, I'd double check the return codes from each of the
functions. It seems as though one or more may have no effect and that
HyperTerminal is actually setting the prort's state.

Regards.
Will
PeteC - 05 May 2004 03:26 GMT
Will

You know, I hate how obvious things are once you find the problem

Thanks
Pete

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.