Bespoke dlls and SxS dlls are causing dependency issues RRS feed

  • Question

  • I am trying to understand the best way to setup dlls on Windows XP/7 and MS re-distributable RunTime

    I have created a single COM dll which depends on another set of bespoke, non-COM dlls. All these dll's reside in the same directory. I attempted to load my COM dll into Dependency Walker(DW).

    In DW all the dependencies were resolved albeit for the delay-loaded dlls, as normal.

    I then noted that in my directory of dlls I was also providing MS runtime dll's MSVCR90.dll et al. I removed these from my directory and reloaded the COM dll in DW.

    This caused a dependency issue which I'd imagined should not be there as DW should be using the SxS dll's.

    Investigating this further I noticed that, in fact, my COM dll's dependency on MSVCR90 was being satisfied by the SxS version of the library. The MSVCP90 was also being satisfied by the SxS dll but MSVCP90 was depending on MSVCR90 from my directory– not from the SxS version as I expected. As I'd removed this a dependency issue arose.

    So in summary my COM dll was using 2 MSVCR90 dll's one from SxS and the other from the COM dll's distribution through its dependency on a SxS MSVCP90 dll.

    Could you please explain why this is happening? Why is the SxS dll depending on the MSVCR90.dll from my distribution, as well as another SxS version of that dll. How can this be resolved? I’d asssume I only want to depend on the SxS version of the MS runtime dll’s?

    Wednesday, September 22, 2010 3:11 PM