![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Re: Sharing COM Port access between Processes Hi, You will have to write a wrapper class for the serial port access to allow this sharing. In the wrapper, you publish the methods that you want to share (and events), then handle the shared access using standard Threading sharing constructs -- though threading isn't actually being used explicitly. I have example code for this (a VB6 ActiveX EXE) in my book, see below. However, .NET code would make it even cleaner. Of course, your wrapper class (dll) becomes a new object, and is no longer an instance of SerialPort -- you can, however, inherit SerialPort, and overload the methods that you want to share to add the additional "stuff" that I mention above. Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March 2006. See www.hardandsoftware.net for details and contact information. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Hyper-V -sharing modem for sbs server - How do you connect a com port to a named pipe | Virtual Server | |||
| net.tcp port sharing service - any disadvantages? | .NET General | |||
| sharing global variable between two processes | PowerShell | |||
| telnet to port 19226 doesn't open, no password protected sharing o | Vista General | |||