Welcome to MSDN Blogs Sign in | Join | Help

Breaking the monolithic Filter dll.

An issue came up recently where the architecture of one of our filters had to be changed. The change involved making the filter dll dependent on a few other dlls dropped during the installation process.

 As with all revolutionary changes, the Search Daemon revolted when we tried to index contents using this new incarnation of the filter.After few hours of breaking my head with windbg, it came to light that while the filter dll was made dependent on some other dll's (in the same folder) , we still used the old COM : LoadLibrary call to load the filter.Now since the installation folder of the filter dll was not included in the system path, when the filter dll made calls to the other dll's, the system crashed as it had no idea how to locate these dependent dlls.

If you find yourself running into the same situation, the workaround is simple: Just add the directory of installation (where the filter and dependent dlls reside) to your system path.Ideally, your installer should do this to prevent revolting actions by the software. 

The other alternative is to use WINAPI <SetDllDirectory> function call which adds a SearchPath used to locate DLLs for the application. For details, please refer to:

http://msdn2.microsoft.com/en-us/library/ms686203.aspx 

Published Monday, November 20, 2006 10:26 AM by Deb Haldar

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Breaking the monolithic Filter dll.

Monday, November 20, 2006 7:33 PM by Marc Brooks

Please make it clear that you should be doing this PATH setting only inside the process. We do NOT need yet another program adding itself to our PATH environment variable for the once-in-a-million time it might be needed.

# re: Breaking the monolithic Filter dll.

Tuesday, November 21, 2006 1:08 AM by Deb

I agree that the second alternative is preferred to adding a new entry in the PATH variable.

# re: Breaking the monolithic Filter dll.

Thursday, November 30, 2006 3:24 PM by Dmitry Kuzmenko

If you have control over your filter DLLs, I think, the best work around would be to make the first DLL know the location of another and use explicit linking (with LoadLibrary and full path). In this case there would be no need to modify %PATH%.

# Insights into MS IFilter Testing Strategy.

Thursday, February 08, 2007 6:24 PM by Filter Central

Ever since I started dealing with filters, I've seen numerous questions regarding "What does the proper

# re: Breaking the monolithic Filter dll.

Saturday, June 13, 2009 1:14 PM by 小向美奈子

話題の小向美奈子ストリップを隠し撮り!入念なボディチェックをすり抜けて超小型カメラで撮影した神動画がアップ中!期間限定配信の衝撃的映像を見逃すな

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker