为什么Windows搜索查询我的IFilter一堆奇怪的接口? [英] Why would Windows Search query my IFilter for a bunch of weird interfaces?

查看:319
本文介绍了为什么Windows搜索查询我的IFilter一堆奇怪的接口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了一个IFilter作为本地VC ++ ATL in-proc COM服务器。 Windows搜索不会使用它 - 它创建一个我的IFilter的实例,然后执行一堆QueryInterface()调用,具体:




  • IMarshal

  • IStdMarshalInfo

  • 与{4C1E39E1-E3E3-4296-AA86-EC938D896E92}介面ID
  • >

    和其他几个。因为我的IFilter只实现IFilter,IPersist和IPersistFile大多数调用返回E_NOINTERFACE,所以Windows搜索只释放我的对象,不做任何事。



    为什么查询那些接口如何解决这个问题?

    解决方案

    Windows会检查您的界面是否支持自定义封送这是使用 QueryInterface(...)到那些众所周知的接口(好,半知名)。

    COM层期望一些接口返回 E_NOINTERFACE 并知道如何处理它。


    I've implemented an IFilter as a native VC++ ATL in-proc COM server. Windows Search wouldn't use it - it creates an instance of my IFilter and then executes a bunch of QueryInterface() calls, specifically:

    • IMarshal
    • IStdMarshalInfo
    • something with {4C1E39E1-E3E3-4296-AA86-EC938D896E92} interface id

    and a couple of others. Since my IFilter only implements IFilter, IPersist and IPersistFile most of the calls return E_NOINTERFACE, so Windows Search just releases my object and does nothing.

    Why is it querying for those interfaces and how do I work the problem around?

    解决方案

    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.

    这篇关于为什么Windows搜索查询我的IFilter一堆奇怪的接口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆