:  other :  hhc_lite


This isn't supposed to be a proper program - it's supposed to demonstrate the bare minimum you need to replicate the functionality of HTML Help Workshop's hhc.exe.


hhc.exe is great for generating CHM (which no-one speaks) files from HTML (which everyone speaks). However, if you want to use it dynamically (i.e. not provide CHMs with your binaries), it's a bit confusing.


This rather useful resource page from the Helpware Group gives two really interesting bits of information. If we look at the exports from HHA.DLL, we see that it exports HHA_CompileHHP...
screenshot of exports from hha.dll Yay ;)
This has the following prototype (inferred....)
The two callbacks you have to provide are used to provide running status information (for status bars etc), and to provide useful output.

The HHAData parameter provides detailled return output from the Help Compiler - you can pass in null if you're not interested in this (or if you don't trust the odd looking struct I've thrown together! ;) - the struct I use (HHAData) is inferred from several dumps of HTML help compilation, and seems to work rather well... *g*

And... that's pretty much it. There's some useful output that comes back from the callbacks, and the below program, entertainingly, pretty much performs the same functionality as HHC.EXE. And you don't need to either call out, or install HTML HELP Workshop - just aggregate this functionality!
example of using hhc_lite


sample help source to test against.
(it's beyond the scope of this page to explain how to build HHC source documents - read the HTML HELP workshop docs)


Update: I see Flier Lu got there earlier [page in Chinese] :( .... This version does add the interpretation of the HHAData param tho ;)

Update #2: Bah. It seems that HHA.DLL doesn't necessarily come with your installation. Seems to be fairly easy to get hold of, but I'm sure the joy of licensing rears its head. Might dig into this a bit.....
Last updated 05/2008
Vi is just great