PRB: Contents of the HTML Help API File (Hherror.h) Are Missing

Article translations Article translations
Article ID: 297768 - View products that this article applies to.
This article was previously published under Q297768
Expand all | Collapse all

On This Page

SYMPTOMS

If you use HH_GET_LAST_ERROR command to get error information about your Hypertext Markup Language (HTML) application programming interface (API) calls as shown in the code sample in the "More Information" section, you find that the header file (Hherror.h), which includes the contents and the definition of the used type, is missing from the HTML Help Workshop.

MORE INFORMATION

Steps to Reproduce the Behavior

This code sample returns information about the last error that occurred in the HTML Help ActiveX control (Hhctrl.ocx):
USES_CONVERSION; // For Unicode to ANSI string conversion<BR/>
HH_LAST_ERROR lasterror ;

HWND hwnd = HtmlHelp(
                     hOwner,
                     NULL,
                     HH_GET_LAST_ERROR,
                     reinterpret_cast<DWORD>(&lasterror)) ;

// Make sure that HH_GET_LAST_ERROR succeeded.
if (hwnd != 0)
{
	// Only report an error if you found one:
	if (FAILED(lasterror.hr))
	{
		// Is there a text message to display...
		if (lasterror.description)
		{
			// Convert the String to ANSI
			TCHAR* pDesc = OLE2T(lasterror.description) ;
			::SysFreeString(lasterror.description) ;

			// Display
			MessageBox(hOwner, pDesc,
                       "Help Error", MB_OK) ;
		}
	}
}
				
The following code sample shows the contents of the missing Hherror.h header file:
/****************************************************************************
*                                                                           *
* Hherror.h --- HTML Help API errors                                        *
*                                                                           *
* Copyright (c) 1996-1997, Microsoft Corp. All rights reserved.             
*
*                                                                           *
***************************************************************************
*/ 

#if _MSC_VER > 1000
#pragma once
#endif

#ifndef __HHERROR_H__
#define __HHERROR_H__

#ifdef __cplusplus
extern "C" {
#endif  // __cplusplus


// HH_LAST_ERROR Command Related structures and constants

typedef struct tagHH_LAST_ERROR
{
    int cbStruct ;
    HRESULT hr ;            // The last error code.
    BSTR description ;      // Unicode description string.
} HH_LAST_ERROR ;

// Error codes

#define HH_E_FILENOTFOUND              MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0201L ) // %1 could not be found.
#define HH_E_TOPICDOESNOTEXIST         MAKE_HRESULT( SEVERITY_ERROR
, FACILITY_ITF, 0x0202L ) // The requested topic does not exist.
#define HH_E_INVALIDHELPFILE           MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0203L ) // %1 is not a valid help file.
#define HH_E_NOCONTEXTIDS              MAKE_HRESULT( SEVERITY_ERROR,
 FACILITY_ITF, 0x020AL ) // Help file does not contain context ids.
#define HH_E_CONTEXTIDDOESNTEXIT       MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x020BL ) // The context id does not exist.

// 0x0300 - 0x03FF reserved for keywords
#define HH_E_KEYWORD_NOT_FOUND         MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0300L ) // no hits found.
#define HH_E_KEYWORD_IS_PLACEHOLDER    MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0301L ) // keyword is a placeholder or a "runaway" see also.
#define HH_E_KEYWORD_NOT_IN_SUBSET     MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0302L ) // no hits found because of subset exclusion.
#define HH_E_KEYWORD_NOT_IN_INFOTYPE   MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0303L ) // no hits found because of infotype exclusion.
#define HH_E_KEYWORD_EXCLUDED          MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0304L ) // no hits found because of infotype and subset
 exclusion.
#define HH_E_KEYWORD_NOT_SUPPORTED     MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0305L ) // no hits found because of keywords not being supported in this mode.

#ifdef __cplusplus
}
#endif  // __cplusplus


#endif

				

Properties

Article ID: 297768 - Last Review: May 7, 2002 - Revision: 1.0
APPLIES TO
  • Microsoft HTML Help 1.3
  • Microsoft HTML Help 1.31
  • Microsoft HTML Help 1.32
Keywords: 
kbapi kbpending kbprb KB297768
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com