IErrorLookup::GetHelpInfo

Returns the path of the Help file and the context ID of the topic that explains the error.

HRESULT GetHelpInfo (
   HRESULT      hrError,
   DWORD      dwLookupID,
   LCID         lcid,
   BSTR *         pbstrHelpFile,
   DWORD *      pdwHelpContext);

Parameters

hrError

[in]
The code returned by the method that caused the error.

dwLookupID

[in]
The provider-specific number of the error.

lcid

[in]
The locale ID for which to return the Help file path and context ID.

pbstrHelpFile

[out]
A pointer to memory in which to return a pointer to a string containing the fully qualified path of the Help file. If there is no Help file or an error occurs, the returned value (*pbstrHelpFile) is a null pointer. The memory for this string is allocated by the provider and must be freed by the consumer with a call to SysFreeString.

pdwHelpContext

[out]
A pointer to memory in which to return the Help context ID for the error. If there is no Help file (*pbstrHelpFile is a null pointer), then the returned value has no meaning.

Return Code

S_OK
The method succeeded.

E_FAIL
A provider-specific error occurred.

E_INVALIDARG
pbstrHelpFile or pdwHelpContext was a null pointer.

E_OUTOFMEMORY
The provider was unable to allocate sufficient memory in which to return the Help file path.

DB_E_BADHRESULT
hrError was invalid.

DB_E_BADLOOKUPID
dwLookupID was invalid.

DB_E_NOLOCALE
The locale ID specified in lcid was not supported by the provider.

See Also

IErrorInfo::GetHelpContext, IErrorInfo::GetHelpFile, IErrorLookup::GetErrorDescription