interprocess + sync using shared memory
I was wondering how would you program this.
I have app A which takes in multiple data and displays it. One stream of data is my custom data. i would like to edit this dynamically and display it
app b edits that data. i would like app a to contact this app and give it a pointer so it can edit the data.
app c is a hex editor. i want to see the data in hex. Either for debugging or to make sure no one gives me a solution that only works with 2 apps ;p.
when app b or c changes the data it should alert all the other apps. i dont want anything hackish.
alternatively there could be an app d that also edits the data but the user prefers using that instead of app b. or app b and d edit certain parts better then the other.
some API functions i could look up would be appreciated
side question. if i am running app a, how should i launch app b, c and d? i am thinking i should just open app b, c or d and it should figure out if any of the other apps are running (i could only open app b & d, and they may be created by different programmers)
Quote:Original post by AcidZombie24
some API functions i could look up would be appreciated
CreateNamedPipe
CreateFileMapping
Winsock
Shared Memory example
Named Pipe example
hahhaha
i was hoping for more of a discussion.
Wouldnt named pipes be useless since there are more then 2 apps?
also i dont want to be constantly polling the data. I want an interrupt/callback, maybe even a WM_msg
I implemented an example a few years ago. I was told i should of done it with DDE but i hear now that DDE should be avoided.
i used shared memory with no problem. I didnt like the solution i had to tell the apps about eachother. I am mostly interested in that. winsock/using a port on pc sounds kind of hacking. I cant remember if WM is allowed to be sent to other process (i am sure it was allowed on 98).
and what would happen if i had 2 instance of app A? would named pipes or sockets work with that? i doubt it will cleanly.
How would you guys send notification to each of the apps with a callback or interrupt?
i was hoping for more of a discussion.
Wouldnt named pipes be useless since there are more then 2 apps?
also i dont want to be constantly polling the data. I want an interrupt/callback, maybe even a WM_msg
I implemented an example a few years ago. I was told i should of done it with DDE but i hear now that DDE should be avoided.
i used shared memory with no problem. I didnt like the solution i had to tell the apps about eachother. I am mostly interested in that. winsock/using a port on pc sounds kind of hacking. I cant remember if WM is allowed to be sent to other process (i am sure it was allowed on 98).
and what would happen if i had 2 instance of app A? would named pipes or sockets work with that? i doubt it will cleanly.
How would you guys send notification to each of the apps with a callback or interrupt?
Quote:Original post by AcidZombie24
hahhaha
i was hoping for more of a discussion.
Given lots of ABCDs there is little discussion to be had.
Quote:How would you guys send notification to each of the apps with a callback or interrupt?
Sockets might work. Pipes might work. Shared memory might be best. Files could be even better. Who knows.
But with lots of handwaving in your problem description there's nothing tangible one can say about optimal solution.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement