Open CHM (help file) in C#

后端 未结 7 1544
花落未央
花落未央 2020-12-06 02:29

I\'m trying to open help file (chm extension) in C#.

File.Open(@\"//help.chm\",FileMode.Open, FileAccess.Read, FileShare.Read);

and

相关标签:
7条回答
  • 2020-12-06 03:14

    Adding my comments to an answer as per request:

    It seems that the file name in the first statement is not correct however the second one should work unless the file is locked, not exists or you don't have permissions to access the file. If you want to ShellExecute the file then you should use System.Diagnostics.Process class, but if you want to extract the contents of the CHM, since is compiled and formatted, it can't be read like plain text files. Take a look at these links:

    Decompiling CHM (help) files with C#

    CHM Help File Extractor

    0 讨论(0)
提交回复
热议问题