Hot DLL Errors and their remedies
Illegal System DLL Relocation in User32.dll or Shell32.dll
A couple of the latest Microsoft security patches have wreaked havoc on a few obscure and some not-so-obscure programs. After an installation of MS07-008 (KB928843) or MS07-017 (KB925902), certain programs may crash with the following error:
“app name” – illegal System DLL Relocation
One resolution is to download another patch from Microsoft, which fixes the problems. The patch can be downloaded from Microsoft Update [http://update.microsoft.com/microsoftupdate] or from [http://www.microsoft.com/downloads/details.aspx?familyid=74AD4188-3131-429C-8FCB-F7B3B0FD3D86&displaylang=en]. In some cases, upgrading the affected software will also fix the problem. Microsoft has listed the following programs known to have problems:
- RealTek HD Audio Control Panel, versions 1.41, 1.45, 1.49, 1.57
- ElsterFormular 2006 and 2007
- TUGZip 3.4
- CD-Tag 2.27
- BMC PATROL 7.1
Additionally, Microsoft’s Security Response team has identified two more programs that are affected that are not mentioned in the Microsoft Knowledge Base (KB) article:
- CrystalXP’s BricoPack Vista Inspirat 1.1
- Grisoft Inc.’s AVG 7.5
Corrupt or Missing HAL.dll
The HAL.dll file contains the core libraries for Windows’ Hardware Abstraction Layer, which acts as a buffer between Windows applications and the computer hardware. There are many possible causes of HAL.dll corruption ranging from a botched dual-boot install to disk failure. Typically one of the following errors will appear regarding HAL.dll:
Windows could not start because the following file is missing or corrupt:
C:\WINDOWS\system32\hal.dll.
Please re-install a copy of the above file.
C:\WINDOWS\System32\Hal.dll missing or corrupt:
Please re-install a copy of the above file.
Cannot find C:\Windows\System32\hal.dll
Cannot find hal.dll
There are several solutions to the problem. First, restarting the computer may fix the problem. Secondly, the boot.ini file may be corrupt and need to be fixed. Check out the boot.ini by running msconfig (Start > Run… > msconfig). In the BOOT.INI section, click on the “Check All Boot Paths” button to make sure all boot paths lead to actual partitions. MSConfig will give you the option of removing the entry, but to fix the entry it will have to be edited manually.
If that does not solve the problem, it may be necessary to load the original HAL.dll file from the Windows installation CD. Boot to the CD and run the recovery console. At the console use the following commands to restore the HAL.dll file:
> attrib –H –R –S C:\boot.ini
> del c:\boot.ini
> bootcfg /rebuild
> fixboot
If that fails, boot to the recovery console again and try the following command:
> expand d:\i386\hal.dl_ c:\windows\system32\hal.dll
where ‘d:’ is the CD-ROM drive the Windows CD is in. If that fails, a “repair” installation of XP may solve the problem. The last ditch solution, assuming the hard drive has not been corrupted, is a fresh install of Windows XP, preferably on a separate partition or drive. Installing on the same partition as the existing Windows installation is dangerous because it will overwrite the “Program Files” directory (the Documents and Settings directory should be safe), which can cause all sorts of problems. It may still allow you to recover your data, however, and should be done if no other options remain.
NTDLL.dll errors
NTDLL.dll is a core Windows DLL that may become corrupted. There are myriad causes for this from spyware to sloppily written applications to sloppily written Windows Updates. Since this is a core DLL, the same steps for HAL.dll may work for NTDLL.dll as well. However, if booting is still an option, a registry cleaner may be a better cure than replacing the DLL in terms of time spent troubleshooting. An hour spent cleaning spyware and fixing the registry may save several hours in recovery consoles, moving data, reinstalling applications and restoring preferences.