<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Graphics::TBitmap() per TCP senden?]]></title><description><![CDATA[<p>hallo</p>
<p>ich habe ein Graphics::TBitmap() objekt und möchte den ihalt nun per TCP von einem server zu einem client senden damit der client es in einem TImage darstellen kann. wie geht sowas?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/137085/graphics-tbitmap-per-tcp-senden</link><generator>RSS for Node</generator><lastBuildDate>Sun, 02 Aug 2026 08:35:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/137085.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Feb 2006 10:35:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Graphics::TBitmap() per TCP senden? on Wed, 15 Feb 2006 10:35:10 GMT]]></title><description><![CDATA[<p>hallo</p>
<p>ich habe ein Graphics::TBitmap() objekt und möchte den ihalt nun per TCP von einem server zu einem client senden damit der client es in einem TImage darstellen kann. wie geht sowas?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/994624</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/994624</guid><dc:creator><![CDATA[fooooxy]]></dc:creator><pubDate>Wed, 15 Feb 2006 10:35:10 GMT</pubDate></item><item><title><![CDATA[Reply to Graphics::TBitmap() per TCP senden? on Wed, 15 Feb 2006 10:38:14 GMT]]></title><description><![CDATA[<p>Mit den Komponenten vom C++Builder oder von INDY einfach den Speicherbereich senden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/994633</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/994633</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Wed, 15 Feb 2006 10:38:14 GMT</pubDate></item><item><title><![CDATA[Reply to Graphics::TBitmap() per TCP senden? on Wed, 15 Feb 2006 11:32:59 GMT]]></title><description><![CDATA[<p>ich kriege irgendwie beim server eine zugriffsverletzung sobald ein client connected. anbei etwas code:</p>
<p><strong>server</strong></p>
<p>Das ganze ist in einem timer. stream ist vom type TMemoryStream..</p>
<pre><code class="language-cpp">...
...
...
bmp-&gt;SaveToStream(stream);
   	for(int i = 0; i &lt; ServerSocket1-&gt;Socket-&gt;ActiveConnections; i++)
   	{
        if(stream != NULL)
        {
    		ServerSocket1-&gt;Socket-&gt;Connections[i]-&gt;SendStream(stream);
        }
   	}
</code></pre>
<p><strong>client</strong></p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
TMemoryStream *stream;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ClientSocket1Read(TObject *Sender,
      TCustomWinSocket *Socket)
{
	Socket-&gt;ReceiveBuf(stream, stream-&gt;Size);
	Image1-&gt;Picture-&gt;Bitmap-&gt;LoadFromStream(stream);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::FormCreate(TObject *Sender)
{
	stream = new TMemoryStream();
    ClientSocket1-&gt;Open();	
}
//---------------------------------------------------------------------------

void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &amp;Action)
{
	delete stream;
}
//---------------------------------------------------------------------------
</code></pre>
<p>ne idee was ich falsch mache? zugriffsverletzung lesen/schreiben von 0000000. das klingt irgendwie wie ein ungerichteter zeiger <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/994700</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/994700</guid><dc:creator><![CDATA[fooooxy]]></dc:creator><pubDate>Wed, 15 Feb 2006 11:32:59 GMT</pubDate></item><item><title><![CDATA[Reply to Graphics::TBitmap() per TCP senden? on Wed, 15 Feb 2006 19:44:44 GMT]]></title><description><![CDATA[<p>Keine Ahnung, ob das was mit der Meldung zu tun hat, aber achte mal drauf, Stream-&gt;Position (wieder) auf 0 zu setzen bzw. das zu kontrollieren, bevor du ihn abschickst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/995236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/995236</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Wed, 15 Feb 2006 19:44:44 GMT</pubDate></item></channel></rss>