Advanced: Using the Comm Port

This how-to demonstrates how to control a communications port from .NET. Since the .NET Framework does not support direct control of the Comm Port, a separate class is used that provides direct Win32 API calls. (Note: Comm Port is synonymous with COM Port, Serial Port or RS232 port.) 

Featured Highlights:

This tutorial demonstrates how to use the Comm Port to communicate. In particular, it discusses:

Requirements:

Running the Sample:

To run the sample:

  1. Download and unzip the code into a directory of your choice.  
  2. Doubleclick the VB.NET How-To Using the Comm Port.sln file. 
  3. Click the buttons on the form to test the functionality.
  4. Examine the code in the sample to understand how the code works.

Additional Files in this Sample:

Rs232.vb - This file provides the structure for the class which is used to control access to the Comm Port.   The code for this file can also be found on www.gotdotnet.com