微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

c# – 如何在CHM文件中查找主题ID

我想从我的C#项目中打开一个CHM文件.我想打开CHM文件的相关部分,因此我使用以下代码

Help.ShowHelp(this,help_file,HelpNavigator.TopicId,topic_id);

问题是,我没有CHM文件的来源,我不知道它的主题ID.有没有办法获取此CHM文件主题ID?

解决方法

使用各种提示符之一(主要是基于chmlib)提取CHM,然后查看提取的“* .hhc”文件.这是一个主题图,它将主题图块/ ID与CHM文件中的内部网址相匹配.

请注意,一些罕见的CHM文件具有二进制TOC且没有hhc文件,但由于HH认值不鼓励它,因此它的可能性非常低.

后来添加
Free Pascal chmls工具的提取选项数已更新. (虽然有些更像是转储功能而不是真正的提取):确保从2.6.4获得一个

 list        [section number]
            Shows contents of the archive's 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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐