Description:
Requires:
Code Language:
IntroductionThese HV2 code examples exercise all the main HV2 API calls and adds several helpful debugging tools. We won't be talking about the chrome, just the main help API calls at the heart of the code. SetupOpen the solution HV2ApiExplore.sln (alternatively open HV2Everything.sln and make the "HV2ApiExplore" project the start up project) The main executable project "HV2ApiExplore" uses 2 other DLL assemblies "Helpware.Misc" (my non-help related support code) & "HV2Lib" (HV2 support code, rendering etc). Actually only HV2Lib uses the second DLL for the sole purpose of rendering HTML topics. (in VS 11 we right-click each project's "References" folder and select "Add Reference" and added these DLLs) C:\Program Files\Microsoft Help Viewer\v2.0\Microsoft.VisualStudio.Help.Runtime.dll C:\Program Files\Microsoft Help Viewer\v2.0\Microsoft.VisualStudio.Help.dll
Windows 8 RuntimeTo use the Windows 8 Help run-time instead of VS 11 Help run-time:
Note that Windows 8 does not provide an equivalent to Microsoft.VisualStudio.Help.dll for rendering support. In this case you will need to comment out the VS Help render call in code (which will be obvious because it will cause a compile time error).HV2 NamespacesTo open and read catalogs you will need this namespace: using Microsoft.VisualStudio.Help.Runtime;
For the one place where we reference VS 11 renderering method you need: using Microsoft.VisualStudio.Help;
Page: Help Runtime APIThe first page tab contains a list of sub-pages that demonstrate all the main API calls. See also documentation: HV2 API Calls Page: Content StoreUse this page tab to explore any VS 11 (User Managed) catalog locale store. The contents of the XML files in the store are displayed in the tree view, and if you drill down to a package (.mshc file) you can list the contents of files inside the package (Helpware examples only). Unmanaged catalogs do not have XML files. Note: The Microsoft example code does not contain the right-hand panels, and associated UNZIP support. The Helpware version of these examples contain additional functionality, including the ability to explore the contents of a .mshc (ZIP) file. Monitor Catalog Locks: Check this item to monitor the selected catalogs write locks on a timer (via an API call). You will see the locks set ON when you update the contents of a catalog using the Visual Studio 11 help viewer. Page: HelpIndex.exeOn this page we provide a GUI for the command line tool helpIndexer.exe. For more info on HelpIndexer.exe see Catalogs (explains this utility, different types of catalogs, .mshx and .mshi files etc). Page: Event LogAll errors reported by the HV2 runtime go to the Windows Application Event Log. This includes Help Content Manager errors. This page is handy as it can list just help events. Both HV2 (VS 11 help) events, and HV1 (VS 10 help) events. |
Code Examples >