[helpstringcontext] 属性指定帮助文件中的 32 位帮助上下文标识符。 可以将 [helpstringcontext] 属性应用于 库、 接口、 dispinterface、 module、 coclass、 typedef 语句、属性、参数和方法。
[  helpstringcontext(contextid)[, optional-attribute-list]] idl-statement
参数
- 
contextid 
- 
标识与当前 MIDL 语句关联的帮助文本的唯一整数。 
- 
optional-attribute-list 
- 
零个或多个 MIDL 属性。 
- 
idl-statement 
- 
将应用 [helpstringcontext] 属性的 MIDL 语句。 
备注
使用 ITypeLib2 和 ITypeInfo2 接口中的 GetDocumentation2 函数检索帮助字符串。
示例
[
    uuid(. . .),
    helpstringcontext(103),
    version(1.0)
]
library Lines
{
    [
        uuid(. . .), 
        helpstringcontext(102),
        oleautomation,
        dual
    ]
    interface ILine : IDispatch
    {
        [propget, helpstringcontext(100)] HRESULT Color([out, retval] long* ReturnVal); 
        [propput, helpstringcontext(101)] HRESULT Color([in] long rgb);
    }
};