I've implemente开发者_开发技巧d my own Microsoft Search IFilter. I need two versions of it - 32-bit and 64-bit for deploying them on corresponding systems.
In case of IFilters for any file extension I can only register one IFilter class id. Which means I can only use one version on any system. So having two class ids seems useless - it only makes the automatic installer more complex.
Do I reuse the same COM class id for both or do I use different class ids?
Always use a different CLSID. Dont reuse COM CLSID. You can make them both use the same IID, but always different CLSID.
We ended up reusing the same class id for both versions - since 32-bit programs on Windows 64 see their own copy of HKCR there's no conflict and the same class id is mapped to the right executable in both 32 bit and 64 bit programs. The COM server uses ATL and using the same class id greatly simplified the .rgs registration script.
精彩评论