As far as i know there is no .NET library class that wraps Serial Port communications. Leaving you with a choice of using Platform Invocation Services or finding someone elses control that does it for you.
Basically you use the CreateFile() Win32 API and then use the IntPtr return value to open a .NET System.IO.FileStream.
Here is a link to a MSDN article that discusses doing just that:
>> But that class doesn't apply yo the parallel port
I don't know what class you mean. Given the example if you use the CreateFile() API with the value "LPT1" it opens a handle to the Parallel Port using the default driver configured for the port.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.