Internet Explorer 7 and Html Help “Bug”
A day or so ago I ran across a very frustrating bug that I feel compelled to post here to potentially save someone else the pain I went through.
Here’s the scenario:
- Install one of our legacy Win32 applications
- Install IE7
- Open the help–we use HTML Help (.chm files)
- Everything’s working great!
- Accept updates from the server (we have a custom auto-updater)
- After the application restarts, open the help
- Bam! The app crashes with an exception triggered from somewhere deep inside the ::HtmlHelp Win32 API call. (Please, no comments about the lack of exception handling here
)
None of that code had changed between the original install and the updated version! So what was the problem? It turns out that a component getting downloaded automatically as part of the update was including a Microsoft redistributable file to support Windows NT: PSAPI.dll (version 4.x) which IE7 is not compatible with.
After much googling (and yes, I mean using Google.com, Inc.) and other investigations (like one-by-one putting back DLLs to see if one of them was misbehaving for a reason I couldn’t comprehend), I came across this post in the newsgroups. Bingo! Because the help viewer was loading in our process (or at least from our process), IE’s working directory included the “bad” version of the dll. If I deleted the dll, things ran smoothly (including for our own application). In my case, that was my resolution–delete the file.
Fortunately that version of the file is pretty old so unless you’re explicitly supporting Windows NT, you should be safe relying on the version installed with the OS (found in %SYSTEMROOT%\system32).
August 21st, 2009 at 1:26 pm
Hey man, I have a trouble with IE8 (or 7) and HtmlHelp too… Can U help me???? T.T
Since installed IE8, HtmlHelp content don’t show
properly: in MSDN Lib from VS6 (I still using it) the links send me an error; in Office help, show wiyhout format (without CSSs) and send me errors (links); in IIS help page, the Table of Contents don`t show; and so on any use HHCtrl.
Similar problem with IE7. I need work with these help system because I’m learning programing. Please help me. I’m using WinXP SP3 and Office 2003.
Thanks a lot man. XD