How to send a byte array to another process in C++

前端 未结 2 806
梦如初夏
梦如初夏 2021-01-18 21:29

I have been checking on the site for a way to transfer data from a process to another one in C++. I found the method SendMessage() but it does not seem to be able to take a

2条回答
  •  太阳男子
    2021-01-18 21:38

    Interprocess communication is a plattform-specific thing. In Windows, there are many ways to do that. This MSDN article describes several methods and their pros, cons and use-cases:

    http://msdn.microsoft.com/en-us/library/windows/desktop/aa365574(v=vs.85).aspx

    When you control both applications, and support for 3rd party applications is no concern for you, then sending the WM_COPYDATA message through SendMessage() to the other process might be a good approach.

提交回复
热议问题