MSDN Help Integration

Environment: Windows 2000 Professional, MSDN Oct 2000

I have been looking for a way to integrate my own HTML Help files with MSDN for a long time. The information has been scant to say the least. After many false starts and looking for information all over the web I finally succeeded. Here is how I did it.

Step 1: Create a help project file. I used the MS HTML Help Workshop. You can get it from the MS Platform SDK.

Step 2: Edit the project file to create a .chi file. There is no option to create .chi files in the Help Workshop that I could find so you have to edit the project file manually. I used Active Visual NotePad+.NET ( i.e. NotePad.exe ). Under the [Options] section add the lines

Binary TOC=Yes
Create CHI file =Yes

The Binary TOC line can be also be added using the Help Workshop by going the the Project Tab, opening the Properties Dialog and checking the Create binary table of contents option on the compiler Tab. When I didn't create a binary TOC my entry showed up but the tree would not expand. Gotcha #1

Step 3: Compile the Help Project. When you are done creating your help project compile it and you should have a helpfile.chm and a helpfile.chi file.

Step 4: Edit the MSDN Collection file. This file is located in the MSDN installation directory. For the October MSDN Library on my system the file is C:\Devel\Microsoft Visual Studio\MSDN\2000OCT\1033\MSDN030.COL. This is and XML file containing the folder hierarchy for the MSDN Contents window. Add your folders to the collection I again used Active Visual NotePad+.NET. My example follows in blue

...Other Folders....

    <Folder>
     <TitleString value="Samples"/>
     <FolderOrder value=16/>
     <Folder>
      <TitleString value="=samples"/>
      <FolderOrder value=1/>
      <LangId value=1033/>
     </Folder>
    </Folder>
   </Folder>
   <Folder>
    <TitleString value="GreenRoom Technologies"/>
    <FolderOrder value=2/>
    <Folder>
     <TitleString value="=GreenRoom Tech"/>
     <FolderOrder value=1/>
     <LangId value=1033/>
    </Folder>
   </Folder>
  </Folders>
 </HTMLHelpCollection>
</XML>

Step 5: Edit the HTML Help collection registration file hhcolreg.dat. This is another XML file and I found 2 hhcolreg.dat files on my system. One in the WinNT\Help folder and one in the C:\Documents and Settings\All Users\Application Data\Microsoft\HTML Help folder. The second one is the one that contained all the MSDN stuff. I haven't checked where it is installed on Win98/Me or WinNT 4.0 but you can use [Windows Key]+F to find it. At the bottom of the file add your entries to the file. Mine looks like this...

...Other DocCompilations ...

Editor's Note: Some lines below had to be broken in order to display properly on the page. For your XML to be parsed correctly, each XML directive needs to exist on a single line. For your convenience, the lines that need to be merged are marked in green.

  <DocCompilation>
   <DocCompId value="advnvb5"/>
   <DocCompLanguage value=1033/>
   <LocationHistory>
     <ColNum value=10013/>
     <TitleLocation value="\\MyServer\Devel\MSDNLI~1\
      MSDN\advnvb5.chm"/>
     <IndexLocation value="C:\Devel\Microsoft Visual Studio\
      MSDN\2000OCT\1033\advnvb5.chi"/>
     <QueryLocation value="\\MyServer\Devel\MSDNLI~1\MSDN\
      MSDN030.CHQ"/>
     <LocationRef value="2000OCT-1033-CD3"/>
     <Version value=29304614/>
     <LastPromptedVersion value=0/>
     <TitleSampleLocation value=""/>
     <TitleQueryLocation value="2000OCT-1033-CD2"/>
     <SupportsMerge value=0/>
    </LocationHistory>
   </DocCompilation>
   <DocCompilation>
    <DocCompId value="GreenRoom Tech"/>
    <DocCompLanguage value=1033/>
    <LocationHistory>
     <ColNum value=10013/>
     <TitleLocation value="C:\Devel\MICROS~1\MSDN\2000OCT\
      1033\\helptest.chm"/>
     <IndexLocation value="C:\Devel\MICROS~1\MSDN\2000OCT\
      1033\\helptest.chi"/>
     <LocationRef value=""/>
     <Version value=29304614/>
     <LastPromptedVersion value=0/>
     <TitleSampleLocation value=""/>
     <TitleQueryLocation value="2000OCT-1033-CD2"/>
     <SupportsMerge value=0/>
    </LocationHistory>
   </DocCompilation>
  </DocCompilations>
 </HTMLHelpDocInfo>
</XML>

Make sure the DocCompId value matches the TitleString from the other file.

Save the file and run MSDN that's it. It should work. Mine does. Hope yours will too. Good luck.7;^)

I have included my Help Project along with this post so you can test.

Downloads

Download MSDN Files - 7 Kb


Comments

  • But this doesn't work for current MSDN releases!

    Posted by KevinHall on 03/10/2004 12:12pm

    This doesn't work for current MSDN releases! I enjoyed integrating the HTML Help files of my company's API into MSDN. But then MS changed the MSDN format. If you can find a way to do this with the new MSDN releases, I would be eternally grateful!

    • Uh...Guys... This article was written in like 2000...

      Posted by Shannon McCoy on 12/20/2005 03:46am

      You have VSHIK now, although I have not seen one for VS 2005 but I haven't really looked yet.

      Reply
    • Now MicroSoft Provideds the tool

      Posted by anand_chavali on 12/19/2005 10:34pm

      yes, starting from .NET VS7.0 MS has changed the format and these editing of files wont help. MS has itself provided a tool for that. May be this time MS dont want the MSDN format revealed!!!!!!! http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/hwmscExtendingNETHelp.asp download that and enjoy

      Reply
    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As mobile devices have pushed their way into the enterprise, they have brought cloud apps along with them. This app explosion means account passwords are multiplying, which exposes corporate data and leads to help desk calls from frustrated users. This paper will discover how IT can improve user productivity, gain visibility and control over SaaS and mobile apps, and stop password sprawl. Download this white paper to learn: How you can leverage your existing AD to manage app access. Key capabilities to …

  • Agile methodologies give development and test teams the ability to build software at a faster rate than ever before. Combining DevOps with hybrid cloud architectures give teams not just the principles, but also the technology necessary to achieve their goals. By combining hybrid cloud and DevOps: IT departments maintain control, visibility, and security Dev/test teams remain agile and collaborative Organizational barriers are broken down Innovation and automation can thrive Download this white paper to …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds