I’ve been using IFilters in a C# application I’m working on, and it hasn’t been fun at all. There are all kinds of problems with COM threading and then there are some malfunctioning filter implementations.
Well, I decided one day to get to the bottom of these problems and finally created my own implementation of the LoadIFilter function.
The LoadIFilter function is used to find a filter implementation for a certain file. My implementation does what LoadIFilter does (and a bit more), but it does not involve COM in the process and avoids the threading problems mentioned above. Until now, it hasn’t introduced new problems..
Anyway, I packaged all that information (and source code) in an article and posted it to Code Project. You can find it here. It has some nice information on how to dynamically load a dll and call a function pointer using GetProcAddress (which was not possible before .Net 2.0).
Hope you’ll find it useful.
UPDATE: The article moved to it’s permanent location after being edited. Link updated.