![]() ![]() You can also use Klaus Weisser's HtmlHelp viewer to create the CHB files(They need to be renamed from to. This functionally is thanks to Klaus Weisser. This file can then be loaded next time the same CHM file loaded, and a lot of processing can be avoided. This option allows this data to be saved to a CHB file. ĬHMLib 0.35 updates ported to my C# version (Original C++ library, CHMLib, by Jed Wing.)Īdded a option to allow user to save CHB files - A CHB file is a file which contains the internal data structures which are created when a CHM file is loaded.HTML Help Library updates included (Orignal code by Klaus Weisser – See // New File Open Dialog to allow browsing of complete file system.Added File Association with CHM files (After first run).If you can not read a CHM File, please debug the code and post any changes, If you really can not get the CHM file to view, then please email me with the CHM file. This is some that may or may not get done depending on time. There is more to it that what I have described, so look that the code. Once this is done I can then save the file, and use the OpenNetCF library’s HTML Viewer control to view the page as intended. Also at this point I remove XML and Script tags as they are not supported. In this case a temp directory in the filing system. This file then as to be scanned, and the images, frame pages & Style Sheets used by the HTML page need to be extracted, and the HTML patched so that they point to the new location of the files. Once you have the filename of the page you want to display (From the Index, Contents or search) you can then extract that file from the CHM file. Now that I had the basics working, I then when on to develop the Reader it’s self. Once done, I replaced the base stream handling used by the HTML Help library with the ported library, and then had a working CHM Reader which could extract files, extract help indexes & perform searches using the HTML Help library. This was a case of running both versions of the library side by side in 2 instances of Visual Studio 2003 and extracting files from the same CHM file, making source that the output was the same. Once I had a version which compiled in C#, I then had to test that the code worked. This included creating special classes with hold the data from the internal structures of the CHM File Stream, and manually reading the data from the CHM file into the data members of the class. Net Streams, along with the code which read buffers. I had to convert all the buffer accesses to use. Once I had this source I could port the code to C#. This is because the original code used a lot of macros which made it very difficult to see how to port come sections of the code. Firstly, when porting LZW decompression code, I had to first compile the code in ‘C’ and get the pre-processor to export the source sent to the compiler. There are a number of points to make here concerning the porting of the CHMLib. I also ported from ‘C’ into ‘C#’ the CHMLib library by Jed Wing.Ī Big thank you to these guys for releasing there code so we can all benefit from it.SharpZipLib Library included (required by HtmlHelp Library) See.OpenNetCF Library for the HTML Viewer Control - See. ![]() HTML Help Library by Klaus Weisser – See.The new version of the CHMReader.Net uses the following libraries MCSD NetCore.chm)Handles navigation to Anchor points Handles CHM files which point to other CHM Files (CHM Book Shelf.Uses Regular expressions to patch the HTML code extracted from the CHM.This version had a number of issues, so I decided to write a C# version, and here it is. ![]() In my first article for ‘The Code Project’ I developed a program to view CHM files on a Pocket PC 2003 (Using embedded Visual C++) using the open source CHMLib. ![]()
0 Comments
Leave a Reply. |