How Dependency Walker helps in resolving DLL issues

A couple of weeks ago I was working with one of my team members to fix a failing SQL Server 2005 Service Pack 4 setup. He was was trying to install SP4 on his laptop and the Database Services component was failing with the following error message.

MSP Error: 1920 Service 'SQL Server VSS Writer' (SQLWriter) failed to start.

The SQL Server VSS Writer service was not starting even as a service or on invoking the sqlwriter.exe.

The below error message was logged in the System Event Log.

Activation context generation failed for "C:....sqlwriter.exe".
Dependednt Assemnly Microsoft.VV80.ATL.processorArchitecture="x86", publicKeyToken="1fc8b3b9a1e18e3b", type"win32", version="8.0.50727.1833" could not be found.
Please ue sxstrace.exe for detailed diagnosis.

I tried to import/register the assembly as I had done it here, but none of the attempts were fruitful. Since the SQL Server was running on his personal laptop, we uninstalled Microsoft SQL Server VSS Writer. After this the Service Pack 4 was installed successfully. After this we manually installed VSS Writer component using the .msi file from the Setup folder. Still the VSS Writer service was failing with the same error. Since this was not a High Severity incident we decided to leave it alone.

While I was trying to import the ATL80.dll into GAC, it failed initially stating some issues with the DLL. Whenever a DLL fails to register or any application reports issues with a DLL the first tool that comes to my mind is Dependency Walker. This tool lists all the DLLs on which a given DLL (or exe, ocx etc.) is dependent on. If any of those DLLs are found to have issues, it is reported in red along with a description. In the below screenshot (click to enlarge) LINKINFO.dll on which ATL80.dll has a dependency, is missing.

Since the LINKINFO.dll was missing, I copied it from a working instance to this laptop. After this ATL80.dll got registered successfully.

With Dependency Walker finding the missing dependencies is so easy. The next time you run into an issue with a DLL, remember to use Dependency Walker before proceeding with further.