WHAT IS DLL HELL PROBLEM? HOW THIS PROBLEM IS RESOLVED?

Abhishek Srivasatava

Total Post:70

Points:350
Posted by  Abhishek Srivasatava
C# 
C#
 1029  View(s)
Ratings:
Rate this:
  1. Abhishek Srivasatava

    Post:70

    Points:350
    What is DLL Hell Problem? How this problem is resolved?

    DLL hell problem

    When we install any application in our system, then dll file get stored in the registry, then we install another application which is having same name .dll file , then new dll file overwrites the old dll file. In this case, system was working fine for new application but not working for old application.

    Solution to this problem:

    Assembly Versioning.

    This problem is solved by using the concept of Assembly versioning.

    Once a .Net component/dll is installed, the Global Assembly Cache looks at version,  public key and language information and creates a strong name for the component/dll which is called as Strong Named Assembly. Hence, with same name of assembly could be installed in the GAC that may have two different versions. Once versioning is done with any assembly there will be no chance to conflict, which was earlier happening (DLL HELL).

     

    * Static Linking

    It is a very simple technique to solve DLL Hell problem. In this solution instead of picking up from the system library, compiler pick all the dll file statically from the application folder, mean to say each application have their own library which is statically link to the application. This method was mostly used C/C++ application. This method eliminate dll concept completely.

     

    * Windows File Protection

    Dll hell problem was significantly reduced by this concept. This concept was used in Windows 2000. This method prevents unauthorized application from overwriting system dll. If application uses the specific windows API then it only system will allowed to override. But there was a risk when there is a update required from Microsoft for the existing dll.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!