how to create virtual com port creation software in c# RRS feed

  • Question

  • i have been assigned a task to create a windows software , that have to create a virtual com port ,that should be visible in pc's device manager as virtual com xx.

    with that software we are going to communicating to another existing software.that existing one only can communicate with com port only. so we have to create a virtual com port by my own software.

    please do not suggest third party software....

    is there any visual studio c# code available?....(visual studio windows form application)

    i hope u are   understand my qus and respond soon,,,,,,,,,

    Wednesday, January 29, 2020 12:05 PM

All replies

  • Hello,

    IMHO its going to be hard to find this for C# and that using (and I know you ask not to suggest third party) already coded solutions will be the best path for this task. So why attempt to code this when there are already many solutions out there already? Hopefully the reason is not cost as your time developing this could easily exceed getting something already out there.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    profile for Karen Payne on Stack Exchange

    Wednesday, January 29, 2020 12:28 PM
  • Not possible.  If you really want it to appear in Device Manager, then it needs to be a driver.  It's certainly possible with a kernel driver, and might be possible with a user-mode (UMDF) driver, but both of those will be in C++.

    Alternatively, you can try to use Microsoft's Detours library to hook the CreateFile API in the target process and substitute your own file name.  Again, that's a C/C++ library.

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Sunday, February 2, 2020 7:08 AM
  • Hi veera_ind,

    How is the question going? Please let me know if you need further assistance.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 13, 2020 10:11 AM