Click here to Skip to main content
15,886,798 members
Articles / Programming Languages / C++

Htmlhelp Forensics

Rate me:
Please Sign up or sign in to vote.
4.87/5 (49 votes)
12 Aug 2012CPOL13 min read 189K   3.5K   99  
Cracking the htmlhelp .chm storage format to remove annoying file-lock bug and for the sheer fun of it!
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Second Topic</title>
</head>

<body>
<h1>Second Topic</h1>
<p>The basic idea behind htmlhelp is to move multiple html and graphics files
into one single compressed file with extension chm or its. When the file is
viewed by the user, contents will be displayed by decompressing the internal
files just-in-time as needed. The viewer is the already installed internet
explorer, cunningly invoked by either hh.exe or some obscure control shdocvw.ocx.
CHM extension will be launched with the hh.exe vierwer, whereas ITS extensions
will be launched directly in internet explorer. Both extensions share the same
format controlled by the com interface ITStorage which will described later.</p>
<h2>Graphics</h2>
<p><img border="0" src="second.gif" width="679" height="345"></p>


<h2>Trainingcard with invalid text param</h2>
<OBJECT id=hhctrl type="application/x-oleobject"
        classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
        codebase="hhctrl.ocx#Version=4,74,8793,0"
        width=100
        height=100
>
    <PARAM name="Command" value="TCard">
    <PARAM name="Button" value="Text:yo">
    <PARAM name="Item1" value="42">
    <PARAM name="Item2" value="So long and thanks for all the fish">
</OBJECT>


<h2>Correct Trainingcard with text wParam</h2>
<OBJECT id=hhctrl type="application/x-oleobject"
        classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
        codebase="hhctrl.ocx#Version=4,74,8793,0"
        width=100
        height=100
>
    <PARAM name="Command" value="TCard">
    <PARAM name="Button" value="Text:Train">
    <PARAM name="Item1" value="9999, SendText">
</OBJECT>

</body>

</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Denmark Denmark
Christian Ernst Rysgaard
Chief System Developer Consultant
Connectivity Domain Architect, SimCorp A/S

Comments and Discussions