简体   繁体   English

如何开发虚拟comport c ++

[英]How to develope a Virtual com port c++

I have been told to develop a virtual com port so an app the company has can read off com "comCompanyNameV1".. I tried to pick apart com0com, but it seem so incomplete I'm finding I have to kludge around large parts of it and I have yet to get anything to come close to compiling. 我被告知要开发一个虚拟的COM端口,这样一个公司的应用程序可以读取com“comCompanyNameV1”..我试图分开com0com,但它看起来如此不完整我发现我必须克服它的大部分我还没有得到任何接近编译的东西。 Mostly because the tools that are outlined to use to build aren't available anymore. 主要是因为用于构建的概述工具不再可用。

Can anyone point me in a direction to allow me to create a virtual com port that? 任何人都可以指点我允许我创建一个虚拟的COM端口吗? I really don't want to have to spend a month trying to figure out how to do it from scratch. 我真的不想花一个月的时间试图弄清楚如何从头开始。

Oh.. if some knows how to get it done in languages other than c++ I'm good with that too. 哦..如果有人知道如何用c ++以外的语言完成它我也很擅长。


I forgot to mention. 我忘了提。 The actual hardware might be attached to com1 but I still have to have the app read on the custom named com. 实际的硬件可能会附加到com1,但我仍然需要在自定义命名com上读取应用程序。 It's a third party app and we've got no idea why they picked a strange named com, but they did. 这是第三方应用程序,我们不知道为什么他们选择了一个奇怪的命名com,但他们做到了。

Does How to create a Virtual Com1 port in windows? 如何在Windows中创建虚拟Com1端口? help at all? 有帮助吗?

This is a link to SDK that may make it easier - http://www.download32.com/virtual-serial-port-sdk-i11199.html 这是SDK的链接,可以使它更容易 - http://www.download32.com/virtual-serial-port-sdk-i11199.html

In reply to your comments. 在回复您的意见。 Its been a long time since I did anything with the DDK but googling indicates that there may be a serial port example in there. 自从我用DDK做了一些事情以来已经很长时间了,但谷歌搜索表明那里可能有一个串口示例。 I cannot be certain. 我不能肯定。 However logically speaking the virtual com port should be an NT entity with a user mode component (already supplied). 但从逻辑上讲,虚拟COM端口应该是具有用户模式组件(已提供)的NT实体。 So I'd suspect you'd write a kernel driver that would then communicate with the USER mode process as you see fit. 所以我怀疑你会编写一个内核驱动程序,然后根据你的需要与USER模式进程通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM