Should SMPFilter IFilter example from Platform SDK work with WDS 3.0?

Hi Guys,
I have recently built the SMPFilter sample IFilter from the Platform SDK and installed it on a system running WDS 3.0. (This sample filter indexes ".smp" files, treating them as text).
However WDS 3.0 never successfully finds anything in any of my .smp files, although apparently the files are being indexed. My questions :
(1) is the SMPFilter sample supposed to work under WDS 3.0.
(2) if the answer to (1) is "Yes" then what else can I do to find out what is going wrong on my system. If the answer to (1) is "No" then where can I look to find sample IFilter source that works under WDS 3.0. (My objective is to write my own IFilter, and I using the SMPFilter as a guide).

Additional Details :
- I believe the SMP indexing DLL is installed correctly. Using the Platform SDK's filtdump.exe tool to drive the SMP IFilter behaves as expected.
- I believe WDS 3.0 is installed correctly. I have been using it for several weeks without any apparent problem. If I copy the contents of a .smp file to a .txt file the .txt file is indexed and correctly searchable from WDS.
- I believe WDS 3.0 is calling the SMP IFilter to index the files, all right. I added some logging statements to the source of the CSmpFilter class (implements the IFilter interface) to see if the SMP IFilter is being invoked, and indeed it is. I have not yet tried to log the contents of the text (if any) that is being passed back from the SMP IFilter.
- I can see (using filemon) that when I create a new .smp file, searchprotocolhost.exe queries the file, then searchfilterhost.exe opens the SMP IFilter .dll (c:\windows\system32\smpfilt.dll) for execute, and then searchprotocolhost.exe opens, queries and reads the new .smp file. However in my log file I am concerned to see the line (dumped from the CSmpFilter::Init method)

Opening file \\ \e:\test.smp

when I would have expected

Opening file e:\test.smp

I don't know if this is related to the reason I am not seeing any indexed results from any .smp files or not. As I said I know that the new file is being read, but I am not sure if it is always being read correctly.

Well, thanks a lot for reading this far. If you have any suggestions, advice, or other useful information I would be happy to listen.
Cheers,
Wilf









Answer this question

Should SMPFilter IFilter example from Platform SDK work with WDS 3.0?

  • Glenn Wilson

    Hi Paul,
    Thanks very much - your explanation makes perfect sense and would explain what I have observed. Since there is plenty of readily-available information about IPersistStream I am confident that I can get my sample working.
    Cheers,
    Wilf

  • Gustis

    Wilf,

    After some further investigation (I wasn't all that familiar with the smp IFilter example), the .smp IFilter example will not work with 3.0. The reason is that the example uses IPersistFile. IPersistFile is not supported in 3.0. Instead, you must use IPersistStream.

    We are hoping to have an updated sample app available with the next WinSDK platform.

    Paul Nystrom - MSFT



  • F. Gsell

    Hi Paul,
    Thanks a lot for the reply.
    I did indeed add the .smp file type to the indexed files types, and the setting is indeed to "Index Properties and File Contents". I just double checked this now - I was going to attach a screen shot for verification but figured you'd just trust me on this.
    I understand that some IFilters don't work with WDS 3.0 and need to be updated. But what I don't understand is "why" they need to be updated, nor "how" they need to be updated. The SMPFilter was my model for creating a C++ IFilter. If in fact it doesn't work with WDS 3.0 is there another model I can rely on

    Thanks very much,
    Wilf.

  • compuder

    I'll have to look into the SMPFilter IFilter for more info. Some iFilters do not work with WDS 3.0 and need to be updated. Out of initial curiosity, did you add the .smp file type to the indexed file types in WDS To do this right click on the magnifying glass and choose Windows Desktop Search Options. Once there, select Advanced and then click on the File Types tab. If you don't see .smp in the file types list add it (make sure you select index Properties and File Contents). From what you said above it looks like you have already done this, but I just want to be sure.

    Paul Nystrom - MSFT



  • Should SMPFilter IFilter example from Platform SDK work with WDS 3.0?