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.