to get CHM details from help ID

微笑、不失礼 提交于 2020-01-17 06:10:13

问题


I have Help string id and some CHM files

Through the help string, I want to find details like CHM file name, the page linked to that help id, description, title etc of that page.

I have all the code to perform string search on multiple CHM files,if you have file name and search criteria. but my concern is ,only if help id is available, so how can i find topic name ,chm name etc.

Is that possible to find details of chm files through help id ?


回答1:


You may know a CHM is something like a zipped web (HTML archive) with some additional system files of metadata. Context ID's are mostly integrated by compiling a alias.h and map.h file. The purpose of the two files is to ease the coordination between developer and help author. The mapping file links an ID to the map number - typically this can be easily created by the developer and passed to the help author. Then the help author creates an alias file linking the IDs to the topic names (See: Creating Context-Sensitive Help for Applications.

I'm using FAR HTML as a toolbox full of various authoring, file and HTML utilities. It has a 30 day free trial.

Following alias.h was compiled into a CHM:

;-------------------------------------------------------------
; alias.h file example for HTMLHelp (CHM)
; www.help-info.de
;
; All IDH's > 10000 for better format
; last edited: 2006-07-09
;---------------------------------------------------
IDH_90000=index.htm
IDH_10000=Context-sensitive_example\contextID-10000.htm
IDH_10010=Context-sensitive_example\contextID-10010.htm
IDH_20000=Context-sensitive_example\contextID-20000.htm
IDH_20010=Context-sensitive_example\contextID-20010.htm
IDH_30000=CHM-example.chm::/HTMLHelp_Examples\jump_to_anchor.htm#AnchorSample

The CHM can be opened using FAR HTML and by copy and paste you have all ID and topic information.

For doing this by code you must have deep knowledge of the CHM internals.



来源:https://stackoverflow.com/questions/43885231/to-get-chm-details-from-help-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!