c#共享内存demo-两个进程间通过共享内存实现通信

上传者: maizi314 | 上传时间: 2021-03-21 13:04:22 | 文件大小: 107KB | 文件类型: RAR
分为3个工程:proA,proB,ShareMemLib 其中proA,proB是用wpf写的两个模拟进程程序 ShareMemLib将共享内存代码封装成lib,定义了发送者和监听者 两个进程在实例化ShareMemory时指定相同的map,并指定当前为发送者或监听者 发送者负责发送消息,监听者负责接受消息(监听者务必实现接受消息处理方法) 两个进程实例化完成后发送者发送消息,监听者收到消息并处理 至此成功完成了两个进程间通过共享内存实现通信

文件下载

资源详情

[{"title":"( 86 个子文件 107KB ) c#共享内存demo-两个进程间通过共享内存实现通信","children":[{"title":"ShareMemLib","children":[{"title":".vs","children":[{"title":"ShareMemLib","children":[{"title":"v14","children":[{"title":".suo <span style='color:#111;'> 100.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"ProA","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"ProA.pdb <span style='color:#111;'> 23.50KB </span>","children":null,"spread":false},{"title":"ProA.exe.config <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"ShareMemLib.dll <span style='color:#111;'> 8.00KB </span>","children":null,"spread":false},{"title":"ProA.exe <span style='color:#111;'> 9.50KB </span>","children":null,"spread":false},{"title":"ShareMemLib.pdb <span style='color:#111;'> 15.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"ProA.csproj <span style='color:#111;'> 4.63KB </span>","children":null,"spread":false},{"title":"App.xaml <span style='color:#111;'> 362B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"ProA_MarkupCompile.i.lref <span style='color:#111;'> 83B </span>","children":null,"spread":false},{"title":"App.g.i.cs <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"ProA.pdb <span style='color:#111;'> 23.50KB </span>","children":null,"spread":false},{"title":"ProA.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"App.g.cs <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"ProA_MarkupCompile.cache <span style='color:#111;'> 232B </span>","children":null,"spread":false},{"title":"ProA_MarkupCompile.i.cache <span style='color:#111;'> 261B </span>","children":null,"spread":false},{"title":"ProA.csproj.GenerateResource.Cache <span style='color:#111;'> 954B </span>","children":null,"spread":false},{"title":"ProA.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 7.23KB </span>","children":null,"spread":false},{"title":"ProA.g.resources <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false},{"title":"MainWindow.g.cs <span style='color:#111;'> 3.29KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"ProA.exe <span style='color:#111;'> 9.50KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"ProA_MarkupCompile.lref <span style='color:#111;'> 67B </span>","children":null,"spread":false},{"title":"ProA.csprojResolveAssemblyReference.cache <span style='color:#111;'> 6.92KB </span>","children":null,"spread":false},{"title":"MainWindow.g.i.cs <span style='color:#111;'> 3.29KB </span>","children":null,"spread":false},{"title":"MainWindow.baml <span style='color:#111;'> 1005B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"App.xaml.cs <span style='color:#111;'> 331B </span>","children":null,"spread":false},{"title":"App.config <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"MainWindow.xaml <span style='color:#111;'> 516B </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 201B </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.75KB </span>","children":null,"spread":false}],"spread":true},{"title":"MainWindow.xaml.cs <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false}],"spread":true},{"title":"ShareMemLib","children":[{"title":"bin","children":[{"title":"Release","children":null,"spread":false},{"title":"Debug","children":[{"title":"ShareMemLib.dll <span style='color:#111;'> 8.00KB </span>","children":null,"spread":false},{"title":"ShareMemLib.pdb <span style='color:#111;'> 15.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"obj","children":[{"title":"Debug","children":[{"title":"TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.57KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"ShareMemLib.dll <span style='color:#111;'> 8.00KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"ShareMemLib.csproj.FileListAbsolute.txt <span style='color:#111;'> 288B </span>","children":null,"spread":false},{"title":"ShareMemLib.pdb <span style='color:#111;'> 15.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"ShareMemLib.csproj <span style='color:#111;'> 2.41KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false}],"spread":true},{"title":"ShareMemory.cs <span style='color:#111;'> 7.88KB </span>","children":null,"spread":false}],"spread":true},{"title":"ShareMemLib.sln <span style='color:#111;'> 1.89KB </span>","children":null,"spread":false},{"title":"ProB","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"ProB.exe.config <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"ProB.exe <span style='color:#111;'> 9.50KB </span>","children":null,"spread":false},{"title":"ShareMemLib.dll <span style='color:#111;'> 8.00KB </span>","children":null,"spread":false},{"title":"ProB.pdb <span style='color:#111;'> 23.50KB </span>","children":null,"spread":false},{"title":"ShareMemLib.pdb <span style='color:#111;'> 15.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"App.xaml <span style='color:#111;'> 362B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"ProB_MarkupCompile.lref <span style='color:#111;'> 67B </span>","children":null,"spread":false},{"title":"ProB.g.resources <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false},{"title":"ProB.csproj.GenerateResource.Cache <span style='color:#111;'> 954B </span>","children":null,"spread":false},{"title":"App.g.i.cs <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"ProB.exe <span style='color:#111;'> 9.50KB </span>","children":null,"spread":false},{"title":"ProB_MarkupCompile.i.lref <span style='color:#111;'> 83B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"App.g.cs <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"ProB.csprojResolveAssemblyReference.cache <span style='color:#111;'> 6.92KB </span>","children":null,"spread":false},{"title":"ProB_MarkupCompile.i.cache <span style='color:#111;'> 261B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 7.23KB </span>","children":null,"spread":false},{"title":"MainWindow.g.cs <span style='color:#111;'> 3.29KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"ProB.pdb <span style='color:#111;'> 23.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"ProB.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"ProB_MarkupCompile.cache <span style='color:#111;'> 232B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"MainWindow.g.i.cs <span style='color:#111;'> 3.29KB </span>","children":null,"spread":false},{"title":"MainWindow.baml <span style='color:#111;'> 1005B </span>","children":null,"spread":false},{"title":"ProB.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"App.xaml.cs <span style='color:#111;'> 331B </span>","children":null,"spread":false},{"title":"ProB.csproj <span style='color:#111;'> 4.63KB </span>","children":null,"spread":false},{"title":"App.config <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"MainWindow.xaml <span style='color:#111;'> 516B </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 201B </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.75KB </span>","children":null,"spread":false}],"spread":true},{"title":"MainWindow.xaml.cs <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • GentlerMan :
    还不错,测试可行~
    2019-07-08
  • qq_31983573 :
    例子很好用
    2019-04-09

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明