Microsoft KB Archive/297768

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

Article ID: 297768

Article Last Modified on 5/7/2002

-

APPLIES TO


 * Microsoft HTML Help 1.3
 * Microsoft HTML Help 1.31
 * Microsoft HTML Help 1.32

-



This article was previously published under Q297768



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 &quot;More Information&quot; 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.



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 HH_LAST_ERROR lasterror ;

HWND hwnd = HtmlHelp(                    hOwner,                     NULL,                     HH_GET_LAST_ERROR,                     reinterpret_cast(&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,                      &quot;Help Error&quot;, 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.
 * Copyright (c) 1996-1997, Microsoft Corp. All rights reserved.
 * Copyright (c) 1996-1997, Microsoft Corp. All rights reserved.


 * 1) if _MSC_VER > 1000
 * 2) pragma once
 * 3) endif


 * 1) ifndef __HHERROR_H__
 * 2) define __HHERROR_H__

extern &quot;C&quot; {
 * 1) ifdef __cplusplus
 * 1) 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

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

// 0x0300 - 0x03FF reserved for keywords exclusion.
 * 1) define HH_E_KEYWORD_NOT_FOUND        MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0300L ) // no hits found.
 * 2) define HH_E_KEYWORD_IS_PLACEHOLDER   MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0301L ) // keyword is a placeholder or a &quot;runaway&quot; see also.
 * 3) define HH_E_KEYWORD_NOT_IN_SUBSET    MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0302L ) // no hits found because of subset exclusion.
 * 4) define HH_E_KEYWORD_NOT_IN_INFOTYPE  MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0303L ) // no hits found because of infotype exclusion.
 * 5) define HH_E_KEYWORD_EXCLUDED         MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 0x0304L ) // no hits found because of infotype and subset
 * 1) 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.

}
 * 1) ifdef __cplusplus
 * 1) endif // __cplusplus


 * 1) endif

Additional query words: hherror HH_LAST_ERROR

Keywords: kbapi kbprb kbpending KB297768

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.