Sample serial port program needed

ar_pad

Active member
Joined
Jun 5, 2006
Messages
26
Programming Experience
Beginner
Hi all,

I'm developing serial port program in VB.NET. [Just open,read,write and close.]
I referred the following article - "How to access serial and parallel ports by using Visual Basic .NET." I used the given code . Getting unhandled exception .It occurs while executing Getcommstate API call.

As well as downloaded a sample program (RS232-Visual Basic .NET Code Sample: Using the COM Port in VB.NET) from MSDN website and tried.

http://www.microsoft.com/downloads/details.aspx?FamilyID=075318ca-e4f1-4846-912c-b4ed37a1578b&DisplayLang=en#QuickInfoContainer

Problem is, couldn't get connected continuously. Most of the time it's giving an error "Unable to communicate with modem".

How to solve this problem? if u have working example, kindly share it. or give me a link.

Thanks!
 
Back
Top