Clarification:Many answers seem to be centered around web page thumbnails, or scaling an image. But that's not at all what I'm looking for. What I want is to ask Windows for the thumbnail representation of these file types: .DOC, .PDF, .3DM, .DWG... and mabye about a dozen more. I don't want to parse, render, and make thumbnails myself, because Windows already knows how.
first of all you should know that this cool solution needs you to install related program on the server, for instance if you want the shell to generate thumbnail for PDF files, you should install a PDF reader like Acrobat Reader or Foxit PhantomPDF or some thing like them on the server, it means server will create thumbnail for files which it recognizes them, and it makes sense.
Secondly, check to know which file extensions are generated thumbnail for, in the other words, check whether .psd or .msi file extensions have proper thumbnail or not, then prevent requesting server for generating thumbnail for them(check on both client end and server end).
Thirdly, you might need to get thumbnail through Ajax, personally I suggest you to give files some default thumbnails based on the file type at the first second, then request server for generating thumbnail, in that case you can use following code snippet (I receive the generated bitmap in Base64 format as image which is string actually): 1e1e36bf2d