开发者

Custom PreviewPane - Works in Windows7, not in Vista

I've written an explorer extension to display my custom file format in the Preview Pane. This works fine in Windows 7, but doesn't seem to work in Vista. The same DLL handles both thumbnails and the preview pane. The thumbnails side of things work in both Vista and Windows7.

Adding logs to my code, Vistas only calling my DllGetClassObject function for the thumbnail class, not the preview handler class.

Is there anything obvious that Vista does differently to Windows7 when calling COM DLLs?

Here's the values I'm adding to the registry:

HKEY_CLASSES_ROOT\\.<myext>\\(default) = "<myext>.Thumbnail.Handler.1"
HKEY_CLASSES_ROOT\\<myext>.Thumbnail.Handler.1\\ShellEx\\{8895b1c6-b41f-4c1c-a562-0d564250836f}\\(default) = "<myguid>"
HKEY_CLASSES_ROOT\\CLSID\\<myguid>\\(default) = "<myext> Preview Handler"
HKEY_CLASSES_ROOT\\CLSID\\<myguid>\\DisplayName = "@ExplorerPreviewHandler.dll,-101"
HKEY_CLASSES_ROOT\\CLSID\\<myguid>\\Icon = "@ExplorerPreviewHandler.dll,201"
HKEY_CLASSES_ROOT\\CLSID\\<myguid>\\AppID = "{6d2b5079-2f0b-48dd-ab7f-97cec514d30b}"
HKEY_CLASSES_ROOT\\CLSID\\<myguid>\\InProcServer32\\(default) = "<path to my dll>"
HKEY_CLASSES_ROOT\\CLSID\\<myguid>\\InProcServer32\\ThreadingModel = "Apartment"
HKEY_CLASSES_ROOT\\CLSID\\<myguid>\\InProcServer32\\ProgID = "<myext>.Thumbnail.Handler.1"
HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\PreviewHandlers\\<myguid> = "<myext> Preview Handler"},

Given that my DllGetClassObject isn't being called, I presume the problem must be something to do with what I'm setting in the registry? I know the DLL exports are okay, as it works for the thumbnails in both Vista and Win7, and works for the开发者_运维知识库 preview pane in Windows7.

DLL is x64, as are both my Vista and Win7 OSs. DLL is written in C++ without ATL.

Thankyou for any help with this, Dan.


The reg looks okayish, only the default progid is missing. Win7 does have documented alternate behavior for the location of the PreviewHandlers key. Unfortunately the SDK docs don't say what Vista requires. A Vista time magazine article uses HKLM instead of HKCU. I bet that's it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜