Please read Catalogs documentation to fully understand this documentation. Opening CatalogsThe API can open managed & unmanaged catalogs as well as .mshx file catalogs.There are 2 main classes (Catalog & CatalogRead) we need to access a catalog. Most of the other class/enums are used by the methods in these classes. First thing to do instantiate these 2 important classes. private Catalog _catalog = new Catalog(); private CatalogRead _catalogRead = new CatalogRead(); To open a catalog we pass the catalog directory path and locale to the Open() method. The locale parameter is a prioritized list of locales, but we normally want to pass in one specific locale. String catalogPath = @"C:\ProgramData\Microsoft\HelpLibrary2\Catalogs\VisualStudio11"; String locale = "en-US";
_catalog.Open(catalogPath, new String[] { locale }); To open a .mshx file we use the OpenMshx() method. String catalogPath = "c:\somePath\helpfile.mshx"; _catalog.OpenMshx(catalogPath); The Catalogs page contains a list of VS 11 managed catalogs. You can also add to this list unmanaged catalog folders and .mshx catalog files. The main purpose of the page is to open and close catalogs. Access to catalog data can not happen until we open a catalog. We also demonstrate the other catalog methods.
|
Code Examples > HV2 API Explore >