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?
-
What operating system version you are running? – help-info.de Feb 13 '16 at 17:56
-
Oh, of course, WIndows7, 64bit. But the program itself is significantly older... circa 1998/1999. – Rajada Feb 14 '16 at 00:29
-
I think the yesterday added tag 'Winhelp' is in context of the question. – help-info.de Feb 14 '16 at 17:37
-
Can you please share a snapshot of the application and error window in your question (edit)? – help-info.de Feb 14 '16 at 17:44
-
This has nothing to do with making the help file, nor am I using WinHelp. That was a typo from my original version of the post. – Rajada Feb 15 '16 at 18:31
1 Answers
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.
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
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.

- 6,695
- 16
- 39
- 41
-
Yes, I'm running help version supplied by Microsoft as an optional download. But it seems I wasn't being entirely clear. I've already dug around the app with a hex editor, and I'm not entirely certain the menu options are even implemented. What I was hoping for was that someone knew how to catch that 'topic not found' error and use some kind of trick to get more info out of it so I don't just have to brute force guess the topic ID's. Like, maybe more info gets logged in event viewer. But if there's really no way to pull more info, I suppose it can't be helped. – Rajada Feb 15 '16 at 18:38
-
@Rajada: A [decompiler](http://stackoverflow.com/questions/414068/is-there-a-visual-basic-6-decompiler) is a good option if it is possible. You could also create a new _hlp_ file with say 200 dummy topics to find out the topic ID and rename it to test. **TopicIDs** have to increment from 1 to 200 by 1 which is useful. – Laurie Stearn May 06 '17 at 11:58
-
@Rajada: Forget that if they have read the excerpt from [MSDN](https://msdn.microsoft.com/en-us/library/aa261329%28v=vs.60%29.aspx?f=255&MSPPError=-2147217396) : _Tip If you have more than a few Help topics, it may help to establish a numbering scheme before you start entering HelpContextID's. Assign a different range of numbers for each form or major element in your application, for example, 1000 – 1999 for the first form, 2000 – 2999 for the second, and so forth._ – Laurie Stearn May 06 '17 at 12:18