c++ - Thumbnail Provider not working -


i'm trying write windows explorer thumbnail handler our custom file type. i've got working fine preview pane, having trouble getting work thumbnails.

windows doesn't seem trying call dllgetclassobject entry point.

before continue, note i'm using windows 7 , unmanaged c++.

i've registered following values in registry:

hkcr\clsid\<my guid> hkcr\clsid\<my guid>\inprocserver32 (default value = path dll) hkcr\clsid\<my guid>\inprocserver32\threadingmodel (value = "apartment") hkcr\.<my ext>\shellex\{e357fccd-a995-4576-b01f-234630154e96} (value = guid) 

i've tried using win sdk sample, , doesn't work. , sample project in article (http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/), , doesn't work.

i'm new shell programming, not sure best way of debugging this. i've tried attaching debugger explorer.exe, doesn't seem work (breakpoints disabled, , none of outputdebugstrings displayed in output window). note tried setting "desktopprocess" in registry described in winsdk docs debugging shell, i'm still seeing 1 explorer.exe in task manager - "may" why can't debug it??

any appreciated!

regards, dan.

i stumbled across since mentioned blog ( codemonkeycodes.com ).

what problem having sample? did register dll using regsvr32? version of windows 7 on, 32 or 64?


update:

i can't or isn't working you. downloaded sample site, followed directions , change function stdmethodimp cthumbnailprovider::getthumbnail... like

{ *phbmp = null; *pdwalpha = wtsat_unknown;  ulong_ptr token; gdiplusstartupinput input; if (ok == gdiplusstartup(&token, &input, null)) {     //gcimage.logbuffer();     bitmap * pbitmap = new bitmap(188, 141);     if( pbitmap )     {         color color(0, 0, 0);         pbitmap->gethbitmap(color, phbmp);     } }  gdiplusshutdown(token);  if( *phbmp != null )     return noerror;  return e_notimpl; } 

i registered dll , created new file proper extension, , tada, had nice black thumbnail.

i wish you. maybe want email me code?


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -