Compartir a través de


3.13.4.3 ITypeLib2::GetDocumentation2 (Opnum 15)

The GetDocumentation2 method retrieves values associated with the automation type library.

 HRESULT GetDocumentation2(
   [in] INT index,
   [in] LCID lcid,
   [in] DWORD refPtrFlags,
   [out] BSTR* pbstrHelpString,
   [out] DWORD* pdwHelpStringContext,
   [out] BSTR* pbstrHelpStringDll
 );

index: MUST be equal to the index of an automation type description or to –1. If index is –1, the values of pBstrHelpString, pdwHelpStringContext, and pBstrHelpStringDll MUST correspond to the attributes declared with the Type library as specified in section 2.2.49.3. Otherwise, they MUST correspond to the attributes declared with the specified type.

lcid: MUST be the locale ID of the specified type or type library.

refPtrFlags: MUST be 0, or a combination of the bit flags specified in the following table.

Value

Meaning

TYPELIB_HelpStringArg

0x00000001

MUST specify that the client is interested in the actual pBstrHelpString [out] argument.

TYPELIB_HelpContextArg

0x00000002

MUST specify that the client is interested in the actual pdwHelpStringContext [out] argument.

TYPELIB_HelpFileArg

0x00000004

MUST specify that the client is interested in the actual pBstrHelpStringDll [out] argument.

pbstrHelpString: MUST be set to an implementation-specific BSTR type<63> if the TYPELIB_HelpStringArg bit flag is set in refPtrFlags. MUST be set to a NULL BSTR otherwise.

pdwHelpStringContext: MUST be set to the value that was associated with the specified type or type library using the [helpstringcontext] attribute (see section 2.2.49.2) if the TYPELIB_HelpContextArg bit flag is set in refPtrFlags. MUST be set to 0 otherwise.

pbstrHelpStringDll: MUST be set to the documentation string that was associated with the specified type or type library using the [helpstringdll] attribute (see section 2.2.49.2) if the TYPELIB_HelpFileArg bit flag is set in refPtrFlags. MUST be set to a NULL BSTR otherwise.

Return Values: The method MUST return information in an HRESULT data structure, defined in [MS-ERREF] section 2.1. The severity bit in the structure identifies the following conditions:

  • If the severity bit is set to 0, the method completed successfully.

  • If the severity bit is set to 1, the method failed and encountered a fatal error.