Re: details
- From: Neo Morpheous <bluebpill@xxxxxxxxxxxxxx>
- Date: Wed, 02 Jul 2008 09:49:44 +0100
Martin Priebe wrote:
okay ..
i use shared memory to transfer a bitmap from one process to the second process.
it works.
but i have 2 problems.
first:
process one have to signalize "ready" - so process 2 can read out the shared memory.
second:
i need to signalize "ready" + meta-data. (length of the byte-array)
when i use Win API CreateEvent and OpenEvent - it works.
But i can´t transfer any information with it.
greeting and thx
Martin
Sounds like you would have been better of using Windows messaging, since that is more in line with the event-driven paradigm you appear to be describing. For windows messaging, (assuming you had client/server and not P2P model), you would create an invisble window in the client and you simply send the data to the client from the publisher, when the data is available. Small caveat, the size of the data payload is fixed (i.e. cannot be changed), so your best bet would be to specify the size of the
largest image you expect to send, alternatively, you could incorporate meta data in the payload, which allows you to split it into several 'packets' and then reassemble at the client side.
With shmem (shared memory), you need to set aside a portion of the memory where your sender writes the status (ready, etc) as well as any metadata. The client will have to continously poll this section of shmem to see if data is available and act on that info.
.
- Follow-Ups:
- Re: details
- From: Martin Priebe
- Re: details
- References:
- Event between 2 processes
- From: Martin Priebe
- details
- From: Martin Priebe
- Event between 2 processes
- Prev by Date: RE: Create 'beautiful' sphere icons
- Next by Date: Help with EnumMemberAttribute?
- Previous by thread: details
- Next by thread: Re: details
- Index(es):
Relevant Pages
|