Jump to content
  • Advertisement
Sign in to follow this  
pDK

Two applications, one object

This topic is 4824 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

Hey guys, I am creating a process in which two applications could share a single object. One way that I thought of was to create the object in App1, and send the other (App2) a pointer to the object. But I am not sure how to give the 2nd binary the pointer data. Again, these are two completely different binaries, not two threads... so multi-thread processes are out of the question. I also have a memory management setup so that both applications are not writing to/using the same object at the same time (but if you have any input, that would be great). Any thoughts?

Share this post


Link to post
Share on other sites
Advertisement
Two seperate processes are not all that different from two seperate machines. You need to use some form of IPC (inter-process communication), such as sockets or in your case you could use a memory mapped 'file', which is the same physical memory mapped to two different processes' memory space. I'm not sure what all the issues would be if you created an object in this memory, declaring it volatile and locking with true mutex would be a start.

You could also use something like Microsoft's DCOM or OMG's CCM/Corba3, which are designed for this type of thing. .Net also has built-in remoting, and I imagine Java does to, but I'm not sure what they call it.

If you are using C++ and want to use CCM, then ACE and TAO are a good direction to take.

Share this post


Link to post
Share on other sites
Ahh alright. That seems to be what I was looking for...

A quick google search got me to this tutorial:

http://www.codeproject.com/threads/ipc_tute.asp

Would that be idea you are talking about?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!