windowsexecutablehelpfilewinhelp

Debug an embedded missing help topic from an exe


As far as my understanding goes, when a program accesses a .hlp file, Window's help program handles the request. What I have is an older exe that wants to jump to a specific topic in a .hlp file via a menu option. Of course Windows Help spits out the generic "can't find topic" error, but what I'd really like is if it also told me what topic it was expecting to find so I can create a .hlp with the missing topics included. Is there any way to view a more detailed error log or view the request itself without the source to the exe?

error window


Solution

  • The short story - without the source code of your *.exe (or decompiling) and without the old WinHelp project files I'd say as a first thought - no chance.

    The WinHelp (.hlp) format has been around since the very early 1990s and is superseded by HTML Help 1.x (.chm). Microsoft strongly advise you move away from WinHelp about ten years ago. But for a test application it's running on my Windows10 machine like a charm (excuse the German text) with some heavy steps to fix the bygone WinHelp Viewer. Please note I don't speak of the HTMLHelp Viewer for *.chm help files shown in the background here.

    enter image description here

    Windows Help (WinHlp32.exe) is a Help program that has been included with Microsoft Windows versions starting with the Microsoft Windows 3.1 operating system. However, the Windows Help program has not had a major update for many releases and no longer meets Microsoft's standards. Therefore, starting with the release of Windows Vista and continuing in Windows 7, the Windows Help program will not ship as a feature of Windows. If you want to view 32-bit .hlp files, you must download and install the program (WinHlp32.exe) from the Microsoft Download Center.

    I assume you have installed this package and have a running 32bit application with it's running WinHelp *.hlp file on your Windows7 machine. Only one topic from menu seems to be bad for you.

    This may occur from a wrong TopicID called by the application or a typo in the TopicId of the connected helpfile. Perhaps the programmer has not assigned a topic. So many causes for your error.

    If you have some experience in help authoring you know the compiled WinHelp file *.hlp includes a mapping helpTopicId = topic. You will need this mapping and alias file again when compiling WinHelp!

    Creating a new WinHelp *.hlp file is a hard way (for me too after 15 years not using). You have to decompile and compile again with e.g. a edited topic. You may be warned - because of losing contextId's. See old stuff from my Website at: Converting WinHelp (HLP) to HTMLHelp (CHM) - a freeware tutorial

    You may get lucky with a decompiler for the HelpContextId

    enter image description here

    Normally only one App.HelpFile *.hlp is linked from the application. To display a specific topic in a standard window a call from Visual Basic 6 looks like: WinHelp(hWnd, App.HelpFile, HELP_CONTEXT, ByVal CLng(TopicID)). So only a code update will give you a chance for a new TopicId. This must then match the (new) help file.