 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
dave Guest
|
Posted: Mon Feb 27, 2006 3:03 pm Post subject: Using Indy 10 Multicast server to send TmemoryStream |
|
|
Hi
The Indy TCP Multicast server's send method says it expects a 'const aBuffer:Tbytes' or 'const aData:string'.
I have been led to believe its possible to send a TBitMap image using TCP Multicast but how would I use this components to do it? Is there another method that I'm unaware of or do I convert the image into a TBytes variable, and if so how?
Many thanks for any help given
D |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon Feb 27, 2006 11:03 pm Post subject: Re: Using Indy 10 Multicast server to send TmemoryStream |
|
|
"dave" <deepthinker (AT) btinternet (DOT) com> wrote in message
news:4403063b$1 (AT) newsgroups (DOT) borland.com...
| Quote: | The Indy TCP Multicast server's send method says it expects a 'const
aBuffer:Tbytes' or 'const aData:string'. |
That is almost correct. The Multicasting components have not been updated
yet to use the TIdBytes type. The overloaded version of Send() that takes a
buffer accepts a raw memory address, which makes things a little easier.
See below.
| Quote: | I have been led to believe its possible to send a TBitMap image using
TCP Multicast but how would I use this components to do it?
|
Store the bitmap into a memory stream and then send the contents of the
stream, ie:
var
MStream: TMemoryStream;
begin
MStream := TMemoryStream;
try
Bitmap.SaveToStream(MStream);
...Send(MStream.Memory, MStream.Size);
finally
MStream.Free;
end;
end;
Gambit |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|