Windows 上的进程间通信

发布于 2024-07-25 09:41:06 字数 130 浏览 2 评论 0 原文

我有一个在 Windows 上运行的 TCL 脚本。 我需要与在不同进程中运行的旧 vc++ 6 应用程序进行通信。 我需要进行两种方式的沟通。 在 Linux 中我会使用 dbus,但是对于 Windows 我应该使用什么 IPC 策略?

I have a TCL script running on windows. I need to communicate to a old vc++ 6 app running in a different process. I need to have 2 way communication. In Linux I would use dbus, but what IPC strategy should I use for windows?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

一刻暧昧 2024-08-01 09:41:06

Boost.interprocess 有多种方式,例如共享- C++ 的内存和消息传递。 您始终可以从那里开始,看看哪些内容与您的脚本兼容。

Boost.interprocess has various ways such as shared-memory and message passing for C++. You could always start there and see what is compatible with your script.

红焚 2024-08-01 09:41:06

Windows 上的 Tcl 具有内置的 dde ​​支持(请参阅 dde ​​命令的文档),如果其他应用程序支持此功能,这可能会有所帮助。 另一个选项是 TWAPI (Tcl Windows API) 扩展,它具有将键盘和鼠标输入发送到另一个应用程序的功能,请参阅 http://twapi.magicsplat.com/input.html

Tcl on windows has dde support built-in (see docs for the dde command) which could help if the other application supports this. Another option is the TWAPI (Tcl Windows API) extension, which has facilities for sending keyboard and mouse input to another application, see http://twapi.magicsplat.com/input.html .

天荒地未老 2024-08-01 09:41:06

普通的旧套接字在 Windows 上的 TCL 中工作得很好(和 Linux,以及实现 TCP/IP 的任何地方:)

Plain old sockets work great in TCL on Windows (and Linux, and everywhere TCP/IP is implemented :)

泅渡 2024-08-01 09:41:06

MSDN 中的选项列表:http://msdn。 microsoft.com/en-us/library/aa365574(VS.85).aspx

如果您想要更“企业”的东西,还有 Windows 消息队列

A list of options from MSDN : http://msdn.microsoft.com/en-us/library/aa365574(VS.85).aspx

If you want something more 'enterprisy', there's also Windows Message Queue.

浴红衣 2024-08-01 09:41:06

从 Tcl 的角度来看,如果您的 VC6 应用程序允许,最简单的方法是让 TCL 启动 VC 应用程序,然后使用 stdin 和 stdout 进行通信。 如果这不可能,Tcl socket 命令允许您与另一个进程建立 TCP 套接字连接。

请参阅此处了解第一个和此处了解有关套接字的一些信息。

From the Tcl perspective the simplest way, if your VC6 app allows it, would be to get TCL to start the VC app and then use stdin and stdout to communicate. If that's not possible the the Tcl socket command allows you to establish a TCP socket connection with another process.

See here for details of the first and here for some info on sockets.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文