Click here to Skip to main content
15,881,859 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello, I'm new to C++ and C# and I was making a visual studio console app, and I wanted a console app any console app can connect to with socket or something else for communication
like chatting right, and that console app will write another memory of a already created process window when it opens or with a console get line command for writing
a process for when the process is open,


for example:
when the console app writes the process or write the process by a get line sentence. I want the notepad window or process by name for the known memory, or in this case
sentence, want the sentence or memory to share it to another notepad process/window when it opens.

What I have tried:

what ive tried:
ive been searching for ipc and writeprocessmemory for solution for my example, but its like if its never been done before, if so, please help me
and fill free to ask some questions, answers, and some mistakes I've made.
Posted
Updated 22-Dec-22 8:28am
v2

1 solution

I don't see a need to use WriteProcessMemory. Interprocess communication can take care of that and there are several ways you can do it. Among them are :
- Sockets
- Named Pipes
- WM_COPYDATA
- Shared Memory
and there are others. Some of these can work with a network (the first two) and some can not (the last two). Using a secondary thread to manage communication might simplify things for you but not necessarily. Where human interaction is involved simple polling loops can often be fast enough.

Have a look at the Related Questions in the right-hand column of this page. You might find something useful in them.
 
Share this answer
 
Comments
DF.EX 22-Dec-22 15:13pm    
thx so much man

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900