Quick post about Windows Vista - Thumbnail Provider Sample
One of the things that I fondly remember about working on the Visual C++ team years ago are some of the folks I worked with at the time. I was relatively junior, and the people on the MFC and ATL libraries teams were quite senior. What always struck me was how much those guys knew about the inner workings of Windows.
With a new version of Windows to play with - Vista - I've been spending some time plugging away at the plumbing underneath. Namely, the Windows Shell. Funny to say that it is 'plumbing' given that it is the most visible part of Windows. The one thing I've learned about the Windows Shell is that you don't really know Windows until you start programming against the Shell. http://shellrevealed.com is a great site for learning more about the Shell.
I'm hoping to eventually take some of what I learn about the Shell to eventually write a Team Foundation Server Shell extension or two - namely, I'd like to be able to right-click and check out/in. But also, I would like a preview handler for source files and what not.
One of my first steps towards this is building a thumbnail provider. A thumbnail provider enables you to tell the Shell to render a specific thumbnail for a file. That in of itself is nothing new - you could always associate an icon with a file extension. But Vista takes this to another level. By inheriting from a IThumbnail provider interface, you can decide what thumbnail Vista should render for each instance of a file type. It's just another way to deliver information. For example, in terms of Team Foundation Server, I could imagine writing a thumbnail provider that tells you if a file is checked out or not.
I had been really struggling with getting the Thumbnail Provider sample in the Platform SDK working.
I'm not sure what I'm doing wrong, but in looking at a few forums, I noticed some other people having the same problem. I re-did the sample using ATL attributes and for some reason that seemed to have fixed my problem.
You can get my sample here; hope it helps, suggestions are welcome!
Eric.
Labels: Vista
150 Comments:
Being a former Microsoft insider, I'm sure you could provide us with a different insight on how stable and secure Windows Vista really is. I just shifted to the new OS. I solved my driver problems by going to http://www.radarsync.com/vista. However, I'm still quite apprehensive or worried as far as performing financial transactions over the Web is concerned. I've read from many blogs and forums that Vista hasn't patched some of its security features or safeguards.
February 19, 2007 7:17 AM
Error 1 fatal error C1083: Cannot open include file: 'thumbcache.h': No such file or directory e:\others\vista\thumbnailprovider\thumbnailprovider\stdafx.h 44
February 22, 2007 4:24 PM
I tried running your example, but I get the same problem as I did with the recipe example - there is still no thumbnail generated for your sample file. Suggestions?
March 31, 2007 6:46 PM
Apologies, this is a lame suggestion, but did you try restarting? Or at least killing your explorer.exe process? It's been a while, but I faintly remember having to do that to get the thumbnail provider to register properly.
March 31, 2007 7:33 PM
For some reason I didn't get the alert to the first comment in this thread so I'm just addressing it now.
In terms of security, let's talk about what you are trying to do first - perform financial transactions over the web.
IMHO, you shouldn't depend on the OS to keep you secure; this is something you should do yourself.
For example:
1. Make sure the credit card you use online has a good fraud detection and recovery program (Vista, MC, Amex, etc all are excellent).
2. Pay $100/year or so and sign up with Equifax and monitor your credit rating.
3. Consider buying identity theft insurance.
It's a pain and expense to do all of these things, but I think it's a growing reality in today's society.
I didn't put using a secure operating system on that list, because I think it gives you a false sense of security.
Many security breeches are done through 'social engineering' rather than elaborate technical hacks. Paris Hilton's troubles with her phone (
http://www.schneier.com/blog/archives/2005/05/paris_hilton_ce.html) is a great example of this.
You can have the most secure operating system in the world, but at the end of the day, there is a human using that computer. And humans are pretty insecure.
Whether we like to admit it or not, humans can get tricked pretty easily. The Paris Hilton indicident is just one example.
We also pick bad passwords - or we tend to write them down. I know a colleague who keeps all of her passwords in a file on her laptop. Insecure? Sure. But we're only human :)
Now, finally let's talk about Vista :)
Is it secure? I think so :) In terms of anything we do over the web, that data is sent through HTTPS. That means we are using 128-bit key encryption (if you are in US/Canada), 40-bit otherwise. As far as I know, Microsoft's implementation of RSA is about as good as anyone else's. That hasn't changed for better or worse in Vista. There are nice things in Vista like UAC and a next generation of encryption algorithms.
Again, IMHO, but I think the most insecure aspect of a financial transaction we do over the web are the human beings involved :) Certainly someone could snipe our HTTPS traffic and farm it out to a bunch of playstations to crack; but why bother with that trouble when most people use their b-days or pet names for passwords? Failing that, why not try to trick the front-line support folks making minimum wage into giving you access?
Even UAC, the most visible security feature in Vista, is really designed to protect us from ourselves. It is really nothing more than a very visible indication that we are about to do something that might change our system.
Eric.
March 31, 2007 7:59 PM
D6CHJE The best blog you have!
November 1, 2007 10:00 PM
eSWFQb Magnific!
November 2, 2007 10:11 AM
Wonderful blog.
November 2, 2007 11:07 AM
Good job!
November 2, 2007 11:56 AM
Please write anything else!
November 2, 2007 12:45 PM
Good job!
November 2, 2007 1:49 PM
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
November 3, 2007 3:25 AM
Hello all!
November 3, 2007 8:01 AM
Hello all!
November 3, 2007 9:03 AM
Nice Article.
November 3, 2007 10:11 AM
Magnific!
November 3, 2007 10:57 AM
uJwvrS write more, thanks.
November 4, 2007 1:44 AM
Cormgb write more, thanks.
November 4, 2007 9:06 AM
Good job!
November 4, 2007 7:43 PM
Wonderful blog.
November 4, 2007 7:57 PM
Please write anything else!
November 4, 2007 8:18 PM
Wonderful blog.
November 4, 2007 8:31 PM
Good job!
November 4, 2007 10:09 PM
Good job!
November 4, 2007 10:22 PM
Nice Article.
November 4, 2007 10:42 PM
Good job!
November 4, 2007 10:56 PM
Magnific!
November 4, 2007 11:19 PM
Thanks to author.
November 4, 2007 11:32 PM
Please write anything else!
November 4, 2007 11:48 PM
Thanks to author.
November 4, 2007 11:59 PM
Good job!
November 5, 2007 12:17 AM
Magnific!
November 5, 2007 12:30 AM
Thanks to author.
November 5, 2007 12:48 AM
Magnific!
November 5, 2007 1:00 AM
Nice Article.
November 5, 2007 1:22 AM
Hello all!
November 5, 2007 1:38 AM
Please write anything else!
November 5, 2007 2:03 AM
Good job!
November 5, 2007 2:22 AM
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
November 5, 2007 2:44 AM
Please write anything else!
November 5, 2007 3:00 AM
Please write anything else!
November 5, 2007 3:18 AM
Please write anything else!
November 5, 2007 3:31 AM
Please write anything else!
November 5, 2007 3:48 AM
Wonderful blog.
November 5, 2007 4:02 AM
A flashlight is a case for holding dead batteries.
November 5, 2007 4:22 AM
Thanks to author.
November 5, 2007 4:36 AM
Beam me aboard, Scotty..... Sure. Will a 2x10 do?
November 5, 2007 5:00 AM
Hello all!
November 5, 2007 5:15 AM
Lottery: A tax on people who are bad at math.
November 5, 2007 5:33 AM
Good job!
November 5, 2007 5:44 AM
If ignorance is bliss, you must be orgasmic.
November 5, 2007 6:00 AM
All generalizations are false, including this one.
November 5, 2007 6:11 AM
Save the whales, collect the whole set
November 5, 2007 6:30 AM
Energizer Bunny Arrested! Charged with battery.
November 5, 2007 6:46 AM
If ignorance is bliss, you must be orgasmic.
November 5, 2007 7:06 AM
Oops. My brain just hit a bad sector.
November 5, 2007 7:18 AM
C++ should have been called B
November 5, 2007 7:38 AM
Build a watch in 179 easy steps - by C. Forsberg.
November 5, 2007 7:51 AM
Good job!
November 5, 2007 8:11 AM
Please write anything else!
November 5, 2007 8:23 AM
Wonderful blog.
November 5, 2007 8:41 AM
Suicidal twin kills sister by mistake!
November 5, 2007 8:54 AM
What is a free gift ? Aren't all gifts free?
November 5, 2007 9:14 AM
Thanks to author.
November 5, 2007 9:26 AM
Oops. My brain just hit a bad sector.
November 5, 2007 9:48 AM
Build a watch in 179 easy steps - by C. Forsberg.
November 5, 2007 10:00 AM
Magnific!
November 5, 2007 10:25 AM
Change is inevitable, except from a vending machine.
November 5, 2007 10:44 AM
actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.
November 5, 2007 11:10 AM
Wonderful blog.
November 5, 2007 11:23 AM
Please write anything else!
November 5, 2007 11:47 AM
What is a free gift ? Aren't all gifts free?
November 5, 2007 11:58 AM
When there's a will, I want to be in it.
November 5, 2007 12:18 PM
All generalizations are false, including this one.
November 5, 2007 12:33 PM
I don't suffer from insanity. I enjoy every minute of it.
November 5, 2007 12:52 PM
Calvin, we will not have an anatomically correct snowman!
November 5, 2007 1:05 PM
Suicidal twin kills sister by mistake!
November 5, 2007 1:22 PM
Oops. My brain just hit a bad sector.
November 5, 2007 1:31 PM
Give me ambiguity or give me something else.
November 5, 2007 1:47 PM
Wonderful blog.
November 5, 2007 1:58 PM
Give me ambiguity or give me something else.
November 5, 2007 2:16 PM
If ignorance is bliss, you must be orgasmic.
November 5, 2007 2:28 PM
Ever notice how fast Windows runs? Neither did I.
November 5, 2007 2:48 PM
Save the whales, collect the whole set
November 5, 2007 2:56 PM
Nice Article.
November 5, 2007 3:15 PM
Build a watch in 179 easy steps - by C. Forsberg.
November 5, 2007 3:32 PM
Please write anything else!
November 5, 2007 3:54 PM
When there's a will, I want to be in it.
November 5, 2007 4:05 PM
Hello all!
November 5, 2007 4:24 PM
Build a watch in 179 easy steps - by C. Forsberg.
November 5, 2007 4:42 PM
Calvin, we will not have an anatomically correct snowman!
November 5, 2007 5:03 PM
Change is inevitable, except from a vending machine.
November 5, 2007 5:16 PM
Calvin, we will not have an anatomically correct snowman!
November 5, 2007 5:35 PM
The gene pool could use a little chlorine.
November 5, 2007 5:46 PM
What is a free gift ? Aren't all gifts free?
November 5, 2007 6:05 PM
Give me ambiguity or give me something else.
November 5, 2007 6:17 PM
Build a watch in 179 easy steps - by C. Forsberg.
November 5, 2007 6:37 PM
Beam me aboard, Scotty..... Sure. Will a 2x10 do?
November 5, 2007 6:52 PM
Give me ambiguity or give me something else.
November 5, 2007 7:15 PM
All generalizations are false, including this one.
November 5, 2007 7:35 PM
I'm not a complete idiot, some parts are missing!
November 5, 2007 8:01 PM
Nice Article.
November 5, 2007 8:17 PM
Energizer Bunny Arrested! Charged with battery.
November 5, 2007 8:36 PM
A lot of people mistake a short memory for a clear conscience.
November 5, 2007 8:49 PM
Good job!
November 5, 2007 9:14 PM
Save the whales, collect the whole set
November 5, 2007 9:31 PM
The gene pool could use a little chlorine.
November 5, 2007 9:52 PM
Friends help you move. Real friends help you move bodies
November 5, 2007 10:03 PM
Give me ambiguity or give me something else.
November 5, 2007 10:23 PM
All generalizations are false, including this one.
November 5, 2007 10:37 PM
Ever notice how fast Windows runs? Neither did I.
November 5, 2007 10:59 PM
C++ should have been called B
November 5, 2007 11:18 PM
Give me ambiguity or give me something else.
November 5, 2007 11:43 PM
Calvin, we will not have an anatomically correct snowman!
November 6, 2007 12:00 AM
Save the whales, collect the whole set
November 6, 2007 12:27 AM
Lottery: A tax on people who are bad at math.
November 6, 2007 12:46 AM
What is a free gift ? Aren't all gifts free?
November 6, 2007 1:15 AM
What is a free gift ? Aren't all gifts free?
November 6, 2007 1:33 AM
Good job!
November 6, 2007 1:59 AM