3.11.4.7 ITypeLib::GetDocumentation (Opnum 9)
The GetDocumentation method retrieves the documentation resources associated with the automation type library.
-
HRESULT GetDocumentation( [in] INT index, [in] DWORD refPtrFlags, [out] BSTR* pBstrName, [out] BSTR* pBstrDocString, [out] DWORD* pdwHelpContext, [out] BSTR* pBstrHelpFile );
index: MUST equal the ordinal position of an automation type description in the type information table, or –1. If index is –1, the values of pBstrName, pBstrDocString, pdwHelpContext, and pBstrHelpFile MUST correspond to the attributes declared with the Type library, as specified in section 2.2.49.2. Otherwise, they MUST correspond to the attributes declared with the specified type.
refPtrFlags: MUST be a combination of 0, or the bit flags specified in the following table.
Value |
Meaning |
---|---|
TYPELIB_NameArg 0x00000001 |
MUST specify that the client is interested in the actual pBstrName [out] argument. |
TYPELIB_DocStringArg 0x00000002 |
MUST specify that the client is interested in the actual pBstrDocString [out] argument. |
TYPELIB_HelpContextArg 0x00000004 |
MUST specify that the client is interested in the actual pdwHelpContext [out] argument. |
TYPELIB_HelpFileArg 0x00000008 |
MUST specify that the client is interested in the actual pBstrHelpFile [out] argument. |
pBstrName: MUST be set to a BSTR that contains the name of the specified type or Type library if the TYPELIB_NameArg bit flag is set in refPtrFlags. MUST be set to a NULL BSTR otherwise.
pBstrDocString: MUST be set to the documentation string that was associated with the specified type or Type library using the [helpstring] attribute (see section 2.2.49.2), if the TYPELIB_DocStringArg bit flag is set in refPtrFlags. MAY be set to an implementation-specific string<61> if no [helpstring] attribute is specified. MUST be set to a NULL BSTR otherwise.
pdwHelpContext: MUST be set to the value that was associated with the specified type or Type library using the [helpcontext] attribute (see section 2.2.49.2), if the TYPELIB_HelpContextArg bit flag is set in refPtrFlags. MUST be set to 0 otherwise.
pBstrHelpFile: MUST be set to the documentation string that was associated with the specified type or Type library using the [helpfile] 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 and the entire HRESULT DWORD does not match a value in the following table, a fatal failure occurred.
If the severity bit is set to 1 and the entire HRESULT DWORD matches a value in the following table, a failure occurred.
Return value/code
Description
0x8002802B
TYPE_E_ELEMENTNOTFOUND
The value of index was not –1 and did not specify the ordinal position of an element in the type information table. See [MS-ERREF].