Re: need a way

From: bill (wjfwjr_at_hotmail.com)
Date: 02/15/05


Date: Tue, 15 Feb 2005 06:56:51 -0500

Great. I figured there was a way with IPC, just wasn't sure where to start.
Now the last question,,, The shared memory system I am going to build needs
to work between two different types of applications. MainA and MainC can be
MFC VC++ apps. But I need to access the data through a mex file,, in others
words MainB will be a MEX file running from Matlab. So it won't be MFC or
even windows api for that matter.

Any ideas?

I now have something to do this weekend!

Thanks

"Antti Keskinen" <antti.keskinen@REMOVEME.ee.tpu.fi> wrote in message
news:eGGqlLzEFHA.3936@TK2MSFTNGP10.phx.gbl...
> 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" <wjfwjr@hotmail.com> wrote in message
> news:1112ab13npro7d1@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?
>>
>
>



Relevant Pages

  • Re: need a way
    ... The second thing you need is some sort of a messaging system. ... efficient way, in Windows, is of course Windows Messaging. ... MainB uses the shared memory access to get data from the shared memory ... MainC is responsible for sending the WM_CUSTOM_REFRESH_DATA to MainA. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: inconnectivity between windows ce and eCos
    ... I think that what you want is to know how to manage the shared memory. ... For the Windows CE CPU and your applications, you just need to make the ... > processor windows ce is running and in other processor eCOS is running, ... >> devices that happen to be running different operating systems? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Problem with access to shared memory(W2K) / ORIGINALLY (win32) speedfan api control
    ... Thomas Heller, ... pBuf is a pointer to a Buffer structure, ... > I get this error when I try to open a non-existing shared memory block. ... except that if the file is empty Windows raises an exception ...
    (comp.lang.python)

Loading