Answered by:
Posting messages between process with string data

Question
-
Is there any safe way to PostMessage() string data between processes. WM_COPYDATA cannot be used since it should not be posted.
Thanks, Renjith V R
Thursday, May 21, 2015 1:22 PM
Answers
-
On 5/21/2015 9:22 AM, "Renjith V Ramachandran" wrote:
Is there any safe way to PostMessage() string data between processes.
No, but there are many other inter-process communication mechanisms available. You could, for example, write the string to a block of shared memory, then post a message to the target process to let it know it can go read it.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa366551.aspx
Igor TandetnikThursday, May 21, 2015 3:43 PM
All replies
-
This may not be the right approach..but will work
as you are able to PostMessage between two processes, so just before posting the message , write the data into an .INI file and once the other process receives the message it can read the same .INI file.
Thursday, May 21, 2015 2:12 PM -
On 5/21/2015 9:22 AM, "Renjith V Ramachandran" wrote:
Is there any safe way to PostMessage() string data between processes.
No, but there are many other inter-process communication mechanisms available. You could, for example, write the string to a block of shared memory, then post a message to the target process to let it know it can go read it.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa366551.aspx
Igor TandetnikThursday, May 21, 2015 3:43 PM -
On 5/21/2015 9:22 AM, "Renjith V Ramachandran" wrote:
Is there any safe way to PostMessage() string data between processes.
No, but there are many other inter-process communication mechanisms available. You could, for example, write the string to a block of shared memory, then post a message to the target process to let it know it can go read it.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa366551.aspx
Igor TandetnikThanks, Renjith V R
Friday, May 22, 2015 4:25 AM