Reputation: 1
I need to write data to a virtual COM port that I built from this example.
My task requires writing data to the created virtual COM port driver so that an application that was connected to it from the outside can read the written data. The problem is that it is impossible to open two connections to this COM port at the same time (from my application that writes data to the port and from the application that reads the data).
A more specific explanation of the problem is that I need to connect to the created virtual COM port using Putty, which will read incoming data, and accordingly send it data from my application.
I was able to build this example and install it in a test system and verify that it works correctly - connecting, reading and writing data from this virtual port.
I'll say up front that I can't solve this problem by installing third party programs like com0com and the like.
I'm new to system programming and driver programming, so I don't know which direction I should take next.
Upvotes: 0
Views: 367
Reputation: 179779
You're looking at this from the wrong side - literally.
When an application "opens a COM port", that means that the application starts a conversation with the driver for that COM port. You're thinking about your UDMF driver as another application that also opens the COM port. That doesn't make sense. You don't talk to the driver. You are the driver. Applications talk to you.
This also means that you have to understand the example. It shows how to use the Windows UMDF functions. Your application will need to use those UMDF functions.
Upvotes: 1