Closed saschanaz closed 3 years ago
Been a while since I worked with that sample, but I just built the debug version with cargo build
now, registered the dll with regsvr32 thumbnail_provider.dll
(which created the debug.log) and then registered the shell extension by importing the association.reg
into registry. The icons didn't become visible immediately but by the time I started process monitor to figure out what was wrong, the icons were visible.
It's been several minutes and still no luck. BTW, does 61A6080E-0E9F-3CEF-50A7-622D16145B78
in the reg file have any meaning?
Oh wait, did you rename the sample? The e357fccd-a995-4576-b01f-234630154e96
is a hard coded Windows GUID that relates to shell extensions/thumbnail providers, but the 61A6080E-0E9F-3CEF-50A7-622D16145B78
is the CLSID of the ThumbnailProvider
com_class
. It gets derived from the crate name/type name automatically so if one of those changes, the CLSID changes.
.. probably should have hard coded that as well in the attribute!
(The easiest way to find the correct CLSID is to look it up in the registry by doing Find under HKEY_CLASSES_ROOT\CLSID
for ThumbnailProvider.ThumbnailProvider
, where the first one is the camel cased crate name and the second one is the struct name.
So if you renamed crate to foo_bar
and the struc to to MyProvider
, then FooBar.MyProvider
.)
Oh thanks, it now works! I did have my own crate name. Strangely, building the sample itself didn't work either but now it works. 👀
Glad to hear you got it working!
Strangely, building the sample itself didn't work either but now it works. 👀
Didn't work even after I pushed 776868b? That's strange.
In any case, I've now updated the sample to use a hard-coded CLSID so hopefully the next person has easier time with it, thanks for pointing out the issues! :)
Thanks again! Closing since I have no issue anymore 😁
The registration itself succeeds as it creates an empty
debug.log
file, but it still doesn't show thumbnails for .rust files on File Explorer and no actual log is generated. Am I doing something wrong? 🤔