Serial port programming in VB

J

Thread Starter

Jason

Hi everyone,

I am working on a project that require RS232 asynchronous interface using Visual Basic. I started looking into the Win32API, but I don't have any clue. Can any expert give a hint or sample code?

thanks

Jason
[email protected]
 
R

Robert Scott

Keep reading that Win32 API until you understand overlapped I/O vs. non-overlapped I/O, COMM events, blocking vs. non-blocking calls. It does make sense if you study it and it is the way to go. Sample code that you don't understand will be of no use to you.

Robert Scott
Real-Time Specialties
Embedded Systems Consulting
 
Y

Yeasir Rahul

In Visual Basic, you should use the MSComm control for accessing the serial port. Thousands of examples are available in the Net, but the most important are the help pages in MSDN.

Regards
Yeasir Rahul
<a href="http://www.voltsmith.com">VoltSmith Technology</a>
rahul AT voltsmith DOT com
 
Jason,

There is a good demo in the Samples section of Microsoft Help & Support: http://support.microsoft.com/default.aspx?scid=kb;en-us;140880 (Search for article 140880 if the link breaks)

That will give you a starting point. From there, search for "serial API" on the Microsoft web site and you will find several more articles. Look for the links that start with 'msdn'.

Sealevel Systems (http://www.sealevel.com) includes help files and code samples for C++ and VB on the CD that ships with their serial products.
 
Top