• 大小: 0.08M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: 进程  通信  

资源简介

两个不同的 winform应用程序之间通信 示例源码

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.Runtime.InteropServices;  

namespace Receiver
{
    public partial class frmReceiver : Form
    {
        const int WM_COPYDATA = 0x004A; 

        public frmReceiver()
        {
            InitializeComponent();
        }
       
        protected override void DefWndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case WM_COPYDATA:

                    COPYDATASTRUCT ml = new COPYDATASTRUCT();
                    Type t = ml.GetType();
                    ml = (COPYDATASTRUCT)m.GetLParam(t);
                    string strRe

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       8704  2017-09-16 22:27  SendMessageExample\Receiver\bin\Debug\Receiver.exe

     文件      24064  2017-09-16 22:27  SendMessageExample\Receiver\bin\Debug\Receiver.pdb

     文件      11600  2017-09-16 22:32  SendMessageExample\Receiver\bin\Debug\Receiver.vshost.exe

     文件        490  2017-03-19 05:00  SendMessageExample\Receiver\bin\Debug\Receiver.vshost.exe.manifest

     文件       1358  2017-09-16 22:27  SendMessageExample\Receiver\frmReceiver.cs

     文件       2555  2017-09-13 22:42  SendMessageExample\Receiver\frmReceiver.Designer.cs

     文件       5817  2017-09-13 22:43  SendMessageExample\Receiver\frmReceiver.resx

     文件       2867  2017-09-14 22:06  SendMessageExample\Receiver\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6426  2017-09-16 22:32  SendMessageExample\Receiver\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        952  2017-09-16 22:32  SendMessageExample\Receiver\obj\x86\Debug\Receiver.csproj.FileListAbsolute.txt

     文件        981  2017-09-13 22:57  SendMessageExample\Receiver\obj\x86\Debug\Receiver.csproj.GenerateResource.Cache

     文件      10980  2017-09-13 22:57  SendMessageExample\Receiver\obj\x86\Debug\Receiver.csprojResolveAssemblyReference.cache

     文件       8704  2017-09-16 22:27  SendMessageExample\Receiver\obj\x86\Debug\Receiver.exe

     文件        180  2017-09-16 22:22  SendMessageExample\Receiver\obj\x86\Debug\Receiver.frmReceiver.resources

     文件      24064  2017-09-16 22:27  SendMessageExample\Receiver\obj\x86\Debug\Receiver.pdb

     文件        180  2017-09-16 22:22  SendMessageExample\Receiver\obj\x86\Debug\Receiver.Properties.Resources.resources

     文件        495  2017-09-13 22:38  SendMessageExample\Receiver\Program.cs

     文件       1348  2017-09-13 22:38  SendMessageExample\Receiver\Properties\AssemblyInfo.cs

     文件       2868  2017-09-13 22:38  SendMessageExample\Receiver\Properties\Resources.Designer.cs

     文件       5612  2017-09-13 22:38  SendMessageExample\Receiver\Properties\Resources.resx

     文件       1095  2017-09-13 22:38  SendMessageExample\Receiver\Properties\Settings.Designer.cs

     文件        249  2017-09-13 22:38  SendMessageExample\Receiver\Properties\Settings.settings

     文件       3705  2017-09-16 22:22  SendMessageExample\Receiver\Receiver.csproj

     文件       2560  2017-09-16 22:32  SendMessageExample\Receiver\Receiver.suo

     文件       9728  2017-09-16 22:31  SendMessageExample\Sender\bin\Debug\Sender.exe

     文件      26112  2017-09-16 22:31  SendMessageExample\Sender\bin\Debug\Sender.pdb

     文件      11600  2017-11-17 16:30  SendMessageExample\Sender\bin\Debug\Sender.vshost.exe

     文件        490  2017-03-19 05:00  SendMessageExample\Sender\bin\Debug\Sender.vshost.exe.manifest

     文件       2403  2017-09-16 22:31  SendMessageExample\Sender\frmSender.cs

     文件       4004  2017-09-13 22:49  SendMessageExample\Sender\frmSender.Designer.cs

............此处省略41个文件信息

评论

共有 条评论