Why would Windows Search query my IFilter for a bunch of weird interfaces?

旧巷老猫 提交于 2019-12-01 10:35:36
Shay Erlichmen

Windows tries check if your interface supports custom marshaling, the only way he can do that is using QueryInterface(...) to those well known interfaces (well, semi well known).
The COM layer expects that some interfaces will return E_NOINTERFACE and knows how to deal with it.

One of the reasons you see "unusual" behavior from time to time is Application Compatibility (appcompat). If there are other, broken filters that (unreasonably) expect to have these interfaces queried, and those are written by big companies, then Microsoft may keep querying just to keep these filters happy. Proper implementations should not be affected by this appcompat, because they would just follow COM rules and return E_NOINTERFACE.

Another reason, courtesy of Raymond Chen. "This is a sure sign that you didn't register your CLSID properly"

edit : And another reason to query for interfaces that don't actually exist, again explained by Raymond.

Have you tried aggregating the free threaded marshaller (CoCreateFreeThreadedMarshaller in your component (? That may be enough to get your component working with windows search.

Does this shed any light for you? COM proxy stub dll and why do you need it. The IID you mention is one of the IIDs mentioned in the article.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!