• Advertisement
Sign in to follow this  

Open file in primary process (inter-process comm)

This topic is 2975 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'm making a editor of sorts, a single instance editor. So when I someone opens an a file that is handled by the editor, the new instance should not only not open (handled using mutex) but somehow tell the primary instance what file was requested to be opened so that the primary instance can open it. I'm not sure how to go about this. thx

Share this post


Link to post
Share on other sites
Advertisement
Check this article out. (It's targeted towards BCB users, but the Win32 API usage is what you need)

You want to notify the other instance of your application of the file to open by using a windows message (the one mentioned in the article, WM_COPYDATA, handles the otherwise-messy transferral of an arbitrary buffer of data to your application!), or a named pipe or mailslot.

Share this post


Link to post
Share on other sites
I recall using the approach in the article linked by mattd and it worked flawlessly. Just forgot about it. [smile]

Share this post


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

  • Advertisement