HH_GET_LAST_ERROR command

Returns information about the last error that occurred in the HTML Help ActiveX control (Hhctrl.ocx).


pszFile dwData
Must be NULL. A pointer to a HH_LAST_ERROR structure.

Example


USES_CONVERSIONS; // For Unicode to ANSI string conversion


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 we 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) ;
}
}
}

Return value

Comments


link to overview topic About commands