Re: details

Tech-Archive recommends: Fix windows errors by optimizing your registry



okay ..
i send the size in the first 4 bytes.
so i read the 1st 4 bytes and then read out the rest with this length

thx
Martin



"Martin Priebe" <martin.priebe@xxxxxxxxxx> schrieb im Newsbeitrag
news:eyQ8PKC3IHA.3544@xxxxxxxxxxxxxxxxxxxxxxx
Okay ... thx lot.

the tip "to specify the size of the largest image you expect" is great.
it works fine.
(but it could be faster when i know the correct size of the array)

if i use the event or windows messaging i don´t know yet.


greeting Martin


"Neo Morpheous" <bluebpill@xxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:BZSdnbxR8urs3fbVnZ2dnUVZ8tSdnZ2d@xxxxxxxxx
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.




.



Relevant Pages

  • Re: details
    ... the tip "to specify the size of the largest image you expect" is great. ... i use shared memory to transfer a bitmap from one process to the second ... Sounds like you would have been better of using Windows messaging, ... you would create an invisble window in the client and you ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: PHP & open connections
    ... client to pull the info on a regular basis. ... Shared memory isn't the problem. ... The problem is you cannot keep the connection open. ... Even then the browser and/or server are free to close the connection if they feel it's been open too long, and most browsers will have a limit as to how long they will wait for data. ...
    (comp.lang.php)
  • Re: O_NOLINK for open()
    ... implementation doesn't provide ACLs for SysV shmem. ... SYSV shared memory has the concept of separate creator and owner ID's, ... so you can share the shmem segment between exactly two users. ... I'm actually not so concerned about the client -- that code will be ...
    (Linux-Kernel)
  • Re: Named shared memory without synchronization
    ... Server names shared memory after the client's executable name. ... Server defines a pointer to an integer in the ... Server runs client. ...
    (microsoft.public.vc.language)
  • RE: GroupWise to Exchange migration
    ... The Windows Messaging from Novell is probably the better one for your environment. ... Windows messaging does have to be installed before GroupWise. ... If you must put all this on the E2K3 server, then I would install the exchange, then the NW client, then WMS, then GW client. ...
    (microsoft.public.exchange.setup)