<?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[OleLoadPicture Problem]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich versuche ein jpg Bild mittels OleLoadPicture zu laden. Auf Windowas 2000 läuft alles bestens. Nur bei Windows XP löppt's net :(.</p>
<p>Das Programm bricht unmittelbar nach OleLoadPicture mit einer Access Violation ab. Aber nur bei zu &quot;großen&quot; Bildern. &quot;Kleinere&quot; kann ich laden und anzeigen.</p>
<p>Gelegentlich kommt auch keine Access Violation sondern nur E_FAIL (also undefinierter Fehler) als Returnwert von OleLoadPicture.</p>
<pre><code>HRESULT hResult = OleLoadPicture(
		pIStream,		// Pointer auf durch ::CreateStreamOnHGlobal(...) erzeugten IStream
		0,
		FALSE,
		IID_IPicture,
		(void**)&amp;m_pIPicture	// IPicture* m_pIPicture; Auch als smart Pointer CComQIPtr gehts nicht
	);
</code></pre>
<p>Habt Ihr ne Idee?</p>
<p>Gruß,<br />
mathi</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/136814/oleloadpicture-problem</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 15:20:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/136814.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Feb 2006 13:39:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to OleLoadPicture Problem on Mon, 13 Feb 2006 13:39:55 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich versuche ein jpg Bild mittels OleLoadPicture zu laden. Auf Windowas 2000 läuft alles bestens. Nur bei Windows XP löppt's net :(.</p>
<p>Das Programm bricht unmittelbar nach OleLoadPicture mit einer Access Violation ab. Aber nur bei zu &quot;großen&quot; Bildern. &quot;Kleinere&quot; kann ich laden und anzeigen.</p>
<p>Gelegentlich kommt auch keine Access Violation sondern nur E_FAIL (also undefinierter Fehler) als Returnwert von OleLoadPicture.</p>
<pre><code>HRESULT hResult = OleLoadPicture(
		pIStream,		// Pointer auf durch ::CreateStreamOnHGlobal(...) erzeugten IStream
		0,
		FALSE,
		IID_IPicture,
		(void**)&amp;m_pIPicture	// IPicture* m_pIPicture; Auch als smart Pointer CComQIPtr gehts nicht
	);
</code></pre>
<p>Habt Ihr ne Idee?</p>
<p>Gruß,<br />
mathi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993073</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993073</guid><dc:creator><![CDATA[mathi]]></dc:creator><pubDate>Mon, 13 Feb 2006 13:39:55 GMT</pubDate></item><item><title><![CDATA[Reply to OleLoadPicture Problem on Mon, 13 Feb 2006 15:43:46 GMT]]></title><description><![CDATA[<p>benutz gdi+ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/993179</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993179</guid><dc:creator><![CDATA[:idee:]]></dc:creator><pubDate>Mon, 13 Feb 2006 15:43:46 GMT</pubDate></item><item><title><![CDATA[Reply to OleLoadPicture Problem on Mon, 13 Feb 2006 16:10:38 GMT]]></title><description><![CDATA[<p>:idee: schrieb:</p>
<blockquote>
<p>benutz gdi+ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /> i got an answere *freu* But more tips would be nice <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Ok, spass bei seite: Habe mir nochmal das sample zu gemüte geführt<br />
Ich lade das file byteweitweise auf den Heap und Lade dann daraus den IStream, den ich an die Ole Funktion übergebe.</p>
<p>Das Sample Programm macht im Prinzip ähnliches nur: Es läd das File in ein CFile object, Läd dann daraus die daten in ein CArchive object, läd dann daraus alles in ein CArchiveStream object und übergibt dann den Pointer (als cast auf IStream*) an die Ole funktion und damit funzt es. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Das einzige worüber ich gestolpert bin ist dieses CArchiveStream, dazu finde ich irgendwie nix in der MSDN bzw. SDK Doku, Ist das schon GDI+?</p>
<p>Falls nicht, gib mal bitte ein bischen mehr Infos.</p>
<p>THX soweit!<br />
Gruß,<br />
mathi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/993198</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/993198</guid><dc:creator><![CDATA[mathi]]></dc:creator><pubDate>Mon, 13 Feb 2006 16:10:38 GMT</pubDate></item></channel></rss>