How can we protect ourselves from other third parties installing DLLs with the same names as some of

Posted by Integer Poet on Stack Overflow See other posts from Stack Overflow or by Integer Poet
Published on 2010-03-11T21:51:22Z Indexed on 2010/03/12 8:27 UTC
Read the original article Hit count: 170

Filed under:
|
|
|

Our product includes several DLLs built from open source into files with default names as delivered by the open source developers. We're careful to install the files in our own directories and we carefully manage the search path (only for our processes) to keep the loader happy.

Another developer -- a towering intellect -- decided it would be easier to install their own build of some of the same open source into C:\WINDOWS under the same default DLL filenames. Consequently, when we launch a process which depends on these open source DLLs, the system searches C:\WINDOWS before our directories and finds the DLLs installed by the other developer. And they are, of course, incompatible.

Ideas which have occurred to me so far:

  • rename all our DLLs to avoid the default names, which would only make it less likely we would encounter collisions
  • load all our DLLs by full path so the loader captures their names into RAM and doesn't search anywhere else the next time they are requested

For various reasons, neither of these options is palatable at the moment.

What else can we do to defend ourselves against the towering intellects of the world?

© Stack Overflow or respective owner

Related posts about win32

Related posts about dll