.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Shell extension thumbnail handler; what am I doing wrong?

Posted By:      Posted Date: October 20, 2010    Points: 0   Category :.NET Framework

I also posted this on the All-in-one forum, but that forum doesn't seem very active. Since .NET 4 now supports shell extensions, I want to create an extension for thumbnails. As basis I used the All-in-one sample CSShellExtInfotipHandler. My code looks like this:

  #region Shell Interfaces

  public struct tagSIZE
    public Int64 cx;
    public Int64 cy;
    public tagSIZE(Int64 x, Int64 y)
      cx = x;
      cy = y;
  [ComImport(), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  internal interface IExtractImage
    void Extract(System.IntPtr phBmpThumbnail);
    void GetLocation(string pszPathBuffer, uint cch, ref uint pdwPriority, ref tagSIZE p

View Complete Post

More Related Resource Links

Create a Shell Extension Handler thumbnail extractor with .net?

Hi,My application creates nice graphics see http://www.mavericksplan.com/mavericks and it saves a custom document type.I'd like to show the contet of the document in Explorer when the user switch to Thumbnail view.To implement this feature I understand I need to create a Shell Extension Handler Thumbnail Extractor that extract the image from my file type to feed Explorer thumbnail vew, which is not easy at all for me.I look on the web and I found 1 C++ example and none in C#.Does anybody have a sample code to create a Shell Extension Handler thumbnail extractor with .net in C#?Thank youAndrea

How can I write managed shell extension in .NET 4

As a followup of http://social.msdn.microsoft.com/Forums/en-US/clr/thread/7ce0c480-59e3-4732-a608-1974a908e44a/, I still wonder how to write managed shell extension in .NET 4. I only found "theory", but how?

Writing an event handler to generate a JPEG thumbnail from a TIFF image


Hi guys,

I'm quite new to programming / development so forgive the rudimentary nature of the question.  I've got a requirement where I need to generate a thumbnail from high resolution TIFF images that are deposited into a SharePoint document library.  Document libraries as far as I can see don't support TIFF images.

I've been advised that I might be able to code an event handler to take the TIFF, generate a JPEG thumbnail, which it can then store in a document library and add to the view in an appropriate column, such as dropping a URL into a picture column.

Now, only having opened VS for XML editing, I'm not sure of the best way to start this.  Any pointers, as such, are gratefully received.



Need to write a shell extension


Hello All,

I need to write a basic shell extension. I have seen lots of these articles, but many of them have to do with C# - 4..

I need to use VS2008 and C# 3.0.. are there any useful links.

Can someone pls help me;


Pls help me if its beneficial to write shell extension in VS2010 and .NET 4.0 or earlier version...

 I am right now following the link in code project



Please let me know if this is the the right approach or should i use COM or other stuffs..
Pls help me..

The Decorator Pattern & Extension Methods

The decorator pattern provides a formal way to add new functionality to an existing type, without sub-classing. First question: What is wrong with classical inheritance? In and of itself, nothing is wrong with the good old Is-A relationship. It is very common to derive a new class from an existing base class in order to override a few virtual members, and add a pinch of new functionality.

The Decorator Pattern & Extension Methods

Numerous design patterns exist in the software world today, and ultimately nothing is preventing you from making your own (if people buy into it or not is another question). Furthermore, there is no 'master list' of patterns that all developers agree upon. While this is true, if you pick up any book on the subject, you will find a set of very common patterns most programmers agree are very useful. Many of these patterns were first formalized in the seminal book on the subject, Design Patterns: Elements of Reusable Object-Oriented Software (aka, the Gang of Four [GOF] book; not to be confused with the UK punk band of the same name).

Code spelling checker extension for visual studio 2010

Building a spelling checker for source code as an extension for visual studio 2010.

Wrong Account being used to access files - Help - No Impersonation


I run a simple .aspx website on a Windows Server 2008 machine.

There is NO impersonation, and System.Security.Principal.WindowsIdentity.GetCurrent().Name returns NT AUTHORITY\NETWORK SERVICE, which it the account which the application pool runs. In my web.config, I have <authentication mode="Forms">.


I tried to test the security of the application and server by removing file permissions to the .aspx files. I was greatly worried when the website continued to run without problem (it should not have been able to read the .aspx files).

By turning on file level auditing, I discovered that the .aspx files were being read by the machine$ account (if the machine is called Serv1, then the files would be read by the Serv1$ account, which seems to have access to all files on the local machine).


Is this a security breach or is this behaviour by design ?

Please can somebody assist, as I am worried.

Whats wrong with this statement


Im trying to updated some old ASP pages with some new .net pages and cant seem to get this update statement to work. I need to update the current ASP code below and then once thats working im going to use that same statement in a procedure for all our new .Net pages..

So can anyone see what im doing wrong by inserting the 2nd column to the update statement?

strSqual = "update tas set date_completed='" & TransDate & ", trans_id=" & InsertedTransID & "' where date_completed is null and sercontract_id="& strContractID & " and DATEDIFF(dd,task_due_date,'" & strProcDate & "')<=14"


I am trying to add an extra column to the update, but not sure if the syntax is correct.

Creating Event Handler in Code behind


Hi, so I have a control that is created in the code behind and generates fine but I can't figure out how to create an event handler for it.  I've found plenty of examples for it in C sharp, but none of them seem to apply to VB.  What I want to do is essentially this:

myDropDownList.SelectedIndexChanged = "Event to do here"

but it doesn't seem to work for me.

Any suggestions are appreciated.

Team System: Building a Visual Studio Team Explorer Extension


There's no magic behind how the TFS Power Tools were integrated with Team Explorer, and we'll show you how to expose your own custom features inside the Team Explorer window.

Brian A. Randell, Marcel de Vries

MSDN Magazine December 2009

Usability in Practice: When Things Go Wrong


This month our usability experts explain what it takes to create informative, useful error messages.

Dr. Charles Kreitzberg and Ambrose Little

MSDN Magazine January 2009

Basic Instincts: Extension Methods


This column discusses one of the new features of Visual Basic 2008-Extension Methods. This powerful new feature was introduced to support LINQ. See what extension methods are, how to apply them yourself, and get some great usage tips.

Adrian Spotty Bowles

MSDN Magazine November 2007

Vista and Office: View Data Your Way With Our Managed Preview Handler Framework


Stephen Toub shows you how to write your own Preview handlers for Windows Vista and Outlook 2007.

Stephen Toub

MSDN Magazine January 2007

Windows Shell: Create Namespace Extensions for Windows Explorer with the .NET Framework


Extending the Windows shell with namespace extensions allows you to create some custom functionality for Windows Explorer. One common use is to enable Explorer to present a list of items that do not exist in one real folder, but actually reside in a number of places. The view on the folder makes it look like these items are in one place, so managing them becomes easier. This article illustrates the process of creating custom shell namespace extensions using C# and the .NET Framework. The author dispels some myths about the difficulty of writing such extensions, and shows that it is easier than it was before .NET. Along the way he outlines undocumented interfaces and describes advanced techniques for consuming them in .NET.

Dave Rensin

MSDN Magazine January 2004

New Graphical Interface: Enhance Your Programs with New Windows XP Shell Features


The Windows XP shell introduces many new features that both users and developers are sure to welcome. The interface supports a number of styles that will be new to users, and it also supports customization of those styles through a new concept called themes. There are more shell registry settings available to the user and developer, a facility for customizing infotips, and infotip shell extensions. In addition, folder views can be customized. This article covers these shell changes and includes a discussion of a number of other Windows XP additions. These include fast user switching, which lets users log on and off quickly, and AutoPlay support for a variety of devices and file types not previously supported.

Dino Esposito

MSDN Magazine November 2001

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend