Compartilhar via


ITypeInfo::GetDocumentation

This method retrieves the documentation string, name of the complete Help file name and path, and the context identifier for the Help topic for a specified type description.

HRESULT GetDocumentation( 
  MEMBERID memid, 
  BSTR FAR* pBstrName, 
  BSTR FAR* pBstrDocString, 
  unsigned long FAR* pdwHelpContext, 
  BSTR FAR* pBstrHelpFile 
);

Parameters

  • memid
    [in] ID of the member whose documentation is to be returned.
  • pBstrName
    [out] Returns a BSTR that contains the name of the specified item. If the caller does not need the item name, then pBstrName can be NULL.
  • pBstrDocString
    [out] Returns a BSTR that contains the documentation string for the specified item. If the caller does not need the documentation string, then pBstrDocString can be NULL.
  • pdwHelpContext
    [out] Returns the Help context identifier associated with the specified item. If the caller does not need the Help context identifier, then pdwHelpContext can be NULL.
  • pBstrHelpFile
    [out] Returns a BSTR that contains the fully qualified name of the Help file. If the caller does not need the Help file name, then pBstrHelpFile can be NULL.

Return Values

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

The function GetDocumentation provides access to the documentation for the member specified by the memid parameter. If the passed-in memid is MEMBERID_NIL, then the documentation for the type description is returned.

If the type description inherits from another type description, this function is recursive to the base type description, if necessary, to find the item with the requested member identifier.

The caller should free the BSTR parameters pBstrName, pBstrDocString, and pBstrHelpFile.

Example

for (i = 0; i < utypeinfoCount; i++)
{
CHECKRESULT(ptlib->GetDocumentation(i, &bstrName, NULL, NULL, NULL));
.
.
.
SysFreeString(bstrName);
}

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oaidl.h, Oaidl.idl.
Link Library: Oleaut32.lib, Uuid.lib.

See Also

ITypeInfo | BSTR

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.