Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method retrieves the library's documentation string, the complete Help file name and path, the localization context to use, and the context identifier for the library Help topic.

Syntax

HRESULT GetDocumentation2( 
  in] int 
index, 
  LCID 
lcid, 
  BSTR FAR* 
pbstrHelpString, 
  unsigned long FAR* 
pdwHelpStringContext, 
  BSTR FAR* 
pbstrHelpStringDll 
); 

Parameters

index

[in] Index of the type description whose documentation is to be returned; if indexis –1, then the documentation for the library is returned.

lcid

[in] Locale Identifiers.

pbstrHelpString

[out] Returns a pointer to a BSTRthat contains the name of the specified item. If the caller does not need the item name, then pbstrHelpStringcan be NULL.

pdwHelpStringContext

[out] Returns a pointer to the Help localization context. If the caller does not need the Help context, then it can be NULL.

pbstrHelpStringDll

[out] Returns a pointer to a BSTRthat contains the fully qualified name of the file that contains the DLL used for Help file. If the caller does not need the file name, then it can be NULL.

Return Value

The following table shows the return values for this function.

Value Description

S_OK

Success.

STG_E_INSUFFICIENTMEMORY

Out of memory.

E_INVALIDARG

One or more of the parameters is invalid.

TYPE_E_IOERROR

The function could not write to the file.

TYPE_E_INVDATAREAD

The function could not read from the file.

TYPE_E_UNSUPFORMAT

The type library has an older format.

TYPE_E_INVALIDSTATE

The type library could not be opened.

TYPE_E_ELEMENTNOTFOUND

The element was not found.

Remarks

Gets information at the type library level. The caller should free the BSTRparameters.

This function will call _DLLGetDocumentationin the specified DLL to retrieve the desired Help string, if there is a Help string context for this item.

If no Help string context exists or an error occurs, then it will defer to the ITypeLib::GetDocumentationmethod and return the associated documentation string.

Requirements

Header oaidl.h, oaidl.idl
Library oleaut32.lib, uuid.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also