How to find object IDs in a CHM file
I want to open a CHM file from my C # project. I want to open the corresponding section of the CHM file, so I use the following line of code
Help.ShowHelp(this, help_file, HelpNavigator.TopicId, topic_id);
The problem is that I don't have the source of the CHM file and I don't know its IDs. Is there a way to get the topic IDs of this CHM file?
source to share
Extract the CHM with one of the various extractors (mostly chmlib based) and then view the extracted "* .hhc" file. This is a theme map that matches the tiles / ids theme for the urls inside the CHM file.
Note that some rare CHM files have a binary TOC and an hhc file, but the chances of this are very low as the default HH prevents this from happening.
Added later: Updated the number of extraction options for the Chmls Free Pascal tool. (although some of them are more functional dump than actual fetch): make sure you get one from 2.6.4+
list [section number]
Shows contents of the archive directory
extract [saveasname]
Extracts file "filename to get" from archive "filename",
and, if specified, saves it to [saveasname]
extractall [directory]
Extracts all files from archive "filename" to directory
"directory"
unblockchm [filespec2] ..
Mass unblocks (XPsp2 +) the relevant CHMs. Multiple files
and wildcards allowed
extractalias [basefilename] [symbolprefix]
Extracts context info from file "chmfilename"
to a "basefilename" .h and "basefilename" .ali,
using symbols "symbolprefix" contextnr
extracttoc [filename]
Extracts the toc (mainly to check binary TOC)
extractindex [filename]
Extracts the index (mainly to check binary index)
printidxhdr
prints #IDXHDR in readable format
printsystem
prints #SYSTEM in readable format
printwindows
prints #WINDOWS in readable format
printtopics
prints #TOPICS in readable format
source to share