<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: IThumbnailProvider Re-Visited</title>
	<atom:link href="http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/</link>
	<description>A place where I can post my software projects and occasionally go on about our technologically driven society</description>
	<lastBuildDate>Sun, 07 Aug 2011 20:09:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: MFC_Convert</title>
		<link>http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/comment-page-1/#comment-313</link>
		<dc:creator>MFC_Convert</dc:creator>
		<pubDate>Wed, 06 Jul 2011 21:55:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeycodes.com/?p=264#comment-313</guid>
		<description>Thanks a lot Jeremy. The post was straightforward and easy to adapt to. Great Writeup. 10/10.

-Cheers
MFC convert</description>
		<content:encoded><![CDATA[<p>Thanks a lot Jeremy. The post was straightforward and easy to adapt to. Great Writeup. 10/10.</p>
<p>-Cheers<br />
MFC convert</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy</title>
		<link>http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/comment-page-1/#comment-310</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Wed, 06 Jul 2011 17:15:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeycodes.com/?p=264#comment-310</guid>
		<description>Paul, I&#039;m glad you ( and Dan ) found this helpful.  It really pleases me that people are still finding this article helpful even a year after I wrote it :)</description>
		<content:encoded><![CDATA[<p>Paul, I&#8217;m glad you ( and Dan ) found this helpful.  It really pleases me that people are still finding this article helpful even a year after I wrote it <img src='http://www.codemonkeycodes.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko</title>
		<link>http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/comment-page-1/#comment-308</link>
		<dc:creator>Marko</dc:creator>
		<pubDate>Tue, 05 Jul 2011 14:30:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeycodes.com/?p=264#comment-308</guid>
		<description>Could you give us your code please?

Thanks</description>
		<content:encoded><![CDATA[<p>Could you give us your code please?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/comment-page-1/#comment-306</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Mon, 04 Jul 2011 15:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeycodes.com/?p=264#comment-306</guid>
		<description>Thanks Jeremy! After trying numerous samples to try and get this to work, yours was the first one that actually did - and was very easy to use to boot!

One thing to note for people trying to use this, if it works the result is a completely blank icon (instead of the default blank page icon). I think it was you and Dan having a conversation on another page I found, and a slight variation on your suggested &quot;Hello World&quot; implementation of GetThumbnail is this:

&lt;code&gt;
	*phbmp = NULL; *pdwAlpha = WTSAT_UNKNOWN;

	ULONG_PTR token;
	GdiplusStartupInput input;
	if (Ok == GdiplusStartup(&amp;token, &amp;input, NULL))
	{
		//gcImage.LogBuffer();
		Bitmap * pBitmap = new Bitmap(188, 141);
		if( pBitmap )
		{
			Graphics xGraphics( pBitmap );
			Font xFont( L&quot;Arial&quot;, 12, FontStyleRegular, UnitPoint );
			SolidBrush xBrush( Color( 0, 0, 0) );
			xGraphics.DrawString(L&quot;Hello!&quot;, 6, &amp;xFont, PointF(0.0f,0.0f), &amp;xBrush );				
			Color color(255, 0, 0);
			pBitmap-&gt;GetHBITMAP(color, phbmp);
		}
	}

	GdiplusShutdown(token);

	if( *phbmp != NULL )
		return NOERROR;

	return E_NOTIMPL;
&lt;/code&gt;

Not forgetting to add #include &quot;Gdiplus.h&quot; and link to &quot;gdiplus.lib&quot;.

Interestingly, Dan works at the same company as myself, and sits a few desks away - yet we discovered this page separately and for different purposes.</description>
		<content:encoded><![CDATA[<p>Thanks Jeremy! After trying numerous samples to try and get this to work, yours was the first one that actually did &#8211; and was very easy to use to boot!</p>
<p>One thing to note for people trying to use this, if it works the result is a completely blank icon (instead of the default blank page icon). I think it was you and Dan having a conversation on another page I found, and a slight variation on your suggested &#8220;Hello World&#8221; implementation of GetThumbnail is this:</p>
<p><code><br />
	*phbmp = NULL; *pdwAlpha = WTSAT_UNKNOWN;</p>
<p>	ULONG_PTR token;<br />
	GdiplusStartupInput input;<br />
	if (Ok == GdiplusStartup(&amp;token, &amp;input, NULL))<br />
	{<br />
		//gcImage.LogBuffer();<br />
		Bitmap * pBitmap = new Bitmap(188, 141);<br />
		if( pBitmap )<br />
		{<br />
			Graphics xGraphics( pBitmap );<br />
			Font xFont( L"Arial", 12, FontStyleRegular, UnitPoint );<br />
			SolidBrush xBrush( Color( 0, 0, 0) );<br />
			xGraphics.DrawString(L"Hello!", 6, &amp;xFont, PointF(0.0f,0.0f), &amp;xBrush );<br />
			Color color(255, 0, 0);<br />
			pBitmap-&gt;GetHBITMAP(color, phbmp);<br />
		}<br />
	}</p>
<p>	GdiplusShutdown(token);</p>
<p>	if( *phbmp != NULL )<br />
		return NOERROR;</p>
<p>	return E_NOTIMPL;<br />
</code></p>
<p>Not forgetting to add #include &#8220;Gdiplus.h&#8221; and link to &#8220;gdiplus.lib&#8221;.</p>
<p>Interestingly, Dan works at the same company as myself, and sits a few desks away &#8211; yet we discovered this page separately and for different purposes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy</title>
		<link>http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/comment-page-1/#comment-265</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Tue, 29 Mar 2011 21:09:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeycodes.com/?p=264#comment-265</guid>
		<description>Ralfn,

Have you tried this on Windows 7? According to Microsoft, it &quot;shouldn&#039;t be written managed&quot;. When is it you set your IStream to null?</description>
		<content:encoded><![CDATA[<p>Ralfn,</p>
<p>Have you tried this on Windows 7? According to Microsoft, it &#8220;shouldn&#8217;t be written managed&#8221;. When is it you set your IStream to null?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralfn</title>
		<link>http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/comment-page-1/#comment-260</link>
		<dc:creator>Ralfn</dc:creator>
		<pubDate>Fri, 11 Mar 2011 12:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemonkeycodes.com/?p=264#comment-260</guid>
		<description>I successfully implemented a ThumbnailProvider in C# by setting all references to IStream to null and calling GC.Collect after the image has been gathered from the stream. Works like a charm.</description>
		<content:encoded><![CDATA[<p>I successfully implemented a ThumbnailProvider in C# by setting all references to IStream to null and calling GC.Collect after the image has been gathered from the stream. Works like a charm.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

