Sign in to follow this  

interprocess + sync using shared memory

This topic is 3505 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
ok. the Memory will be in shared memory.
1) How should 1 process signal to the others that the data has changed. No polling loops, should use callbacks
(if applicable)2) How should the process find out about the other active process.

Share this post


Link to post
Share on other sites

This topic is 3505 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this