Object sharing between applications - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Object sharing between applications

I currently have two applications which I would like to share and object. Does anyone have any suggestions on how this could be done? I need the application that recieves the object to be able to make function calls on it.

Comments

  • zibadianzibadian Posts: 6,349Member
    : I currently have two applications which I would like to share and object. Does anyone have any suggestions on how this could be done? I need the application that recieves the object to be able to make function calls on it.
    :
    You can only do that using a memory-mapped file. Windows 9x might allow you to make a DLL with that object in it and call it from two applications, but Win2k and WinXP won't allow that.
    You could also define the object as a multi-threaded interface, so that one of the applications can become an out-of-process COM server. I'm not sure if the interface will be mapped in the same memory.
    Another way around it, is to create an object with communicates with itself using messages. This allows each application to have his own object in the memory, but can also update the other application.
  • ppainppain Posts: 5Member
    : : I currently have two applications which I would like to share and object. Does anyone have any suggestions on how this could be done? I need the application that recieves the object to be able to make function calls on it.
    : :
    : You can only do that using a memory-mapped file. Windows 9x might allow you to make a DLL with that object in it and call it from two applications, but Win2k and WinXP won't allow that.
    : You could also define the object as a multi-threaded interface, so that one of the applications can become an out-of-process COM server. I'm not sure if the interface will be mapped in the same memory.
    : Another way around it, is to create an object with communicates with itself using messages. This allows each application to have his own object in the memory, but can also update the other application.
    :
    I have never worked with memory-mapped files, is there a tutorial you would recommend? Thanks!
Sign In or Register to comment.