Add and get CHM file version

旧城冷巷雨未停 提交于 2019-12-19 10:08:25

问题


I need to add version info and retrieve it from the CHM file to make it possible to make an alert message to a user about a new CHM-file version available and downloaded.

It means, that I should compare versions of CHM on different machines (Server and clients).

The other way is date and time checking, but I should remember about time zones, so this is complicated, because also one should remember about different file systems, according to Windows SDK help about SetFileTime function and FILETIME structure.

If someone knows the trick - please share.


回答1:


.chm files don't have version information. You will need to find some alternative way to mark the file version.

One way that occurs to me is to include a topic in the help file that contains the version. I imagine that this topic would be hidden, that is not linked by any other topic, not in the table of contents, etc.

All that remains is for your application to be able to read that topic from the help file. I'm sure that can be done with a .chm file parser, if you can obtain one. Perhaps more easily you can get the platform browser to read the topic for you. You can use IHTMLDocument2 to read a URI like this:

mk:@MSITStore:C:\somedir\somefile.chm::/html/SomeTopic.html


来源:https://stackoverflow.com/questions/25721534/add-and-get-chm-file-version

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