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

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.