[英]How to implement a hello world shared memory in c/c++ in windows?
Is shared memory stable at the first place? 共享内存是否稳定在第一位?
I prefer this way to inter-process/application communication because that way I don't need the overhead of parsing data. 我更喜欢这种方式来进行进程间/应用程序通信,因为这样我不需要解析数据的开销。
Is there a good hello world demo on this in c/c++? 在c / c ++中是否有一个很好的hello world演示?
You should check out Boost.Interprocess . 你应该看看Boost.Interprocess 。 It provides the functionality you need and the documentation contains instructions on how to use it.
它提供了您需要的功能,文档包含有关如何使用它的说明。
Is shared memory stable at the first place?
共享内存是否稳定在第一位?
Yes. 是。
I prefer this way to inter-process/application communication because that way I don't need the overhead of parsing data.
我更喜欢这种方式来进行进程间/应用程序通信,因为这样我不需要解析数据的开销。
You may be wrong. 你可能错了。
Is there a good hello world demo on this in c/c++?
在c / c ++中是否有一个很好的hello world演示?
I that you want something like Managing Memory-Mapped Files . 我想要你喜欢管理内存映射文件 。
There are some issues you need to think of when using shared memory: 使用共享内存时需要考虑一些问题:
It's as stable as your code. 它和你的代码一样稳定。
Note that there's no parsing required with any IPC method that supports binary messages,, such as UDP datagrams, message-mode pipes, or mailslots. 请注意,任何支持二进制消息的IPC方法都不需要解析,例如UDP数据报,消息模式管道或邮件槽。
如果您正在寻找一个简单的示例, 在 MSDN 的动态链接库中使用共享内存可能是一个很好的起点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.