Hi !
You need two things. First is a shared memory section that is accessible by
many processes. Being accessible by multiple processes means that many
'applications' can access it. In Windows terms, each application that is
executed runs as a process. So, this type of data exchange is called
Interprocess Communication or IPC. More on this later.
The second thing you need is some sort of a messaging system. The most
efficient way, in Windows, is of course Windows Messaging (WM_). This means
that your MainA has a single thread, with one window object. It can respond
to a message called WM_CUSTOM_REFRESH_DATA, for example, and if this message
is not posted, the thread sleeps.
MainB uses the shared memory access to get data from the shared memory
section. This is quite trivial, see MSDN for CSharedFile if you're using
MFC. If not, then a named pipe is the solution.
MainC is responsible for sending the WM_CUSTOM_REFRESH_DATA to MainA. Note
that using Windows Messaging requires the applications to have a window that
will receive the data. Invisible, 0-sized window objects are a very
effective way and consume only minimal amount of resources.
So, you're not missing anything, it's just about doing it.
-Antti Keskinen
"bill" <wj****@hotmail.com> wrote in message
news:11*************@corp.supernews.com...
I am looking for a way to have an application that is running in the
background serve data to other applications that only live for short
periods of time.
MainA runs all the time. It reads data from a disk(s) and loads it into
some type of memory, pipe or mailbox.
MainB then runs and has the ability to access the data MainA put in the
queue.
MainC then tells MainA to refresh the queue.
MainB then runs and accesses the new data.
Is this possible?
Am I missing something simple?