共用方式為


helpstringcoNtext 屬性

[helpstringcoNtext]屬性會在說明檔中指定 32 位的說明內容識別碼。 您可以將 [helpstringcoNtext] 屬性套用至 程式庫介面dispinterfacemodulecoclasstypedef 語句、屬性、參數和方法。

[  helpstringcontext(contextid)[, optional-attribute-list]] idl-statement

參數

coNtextid

唯一的整數,可識別與目前 MIDL 語句相關聯的解說文字。

optional-attribute-list

零個或多個 MIDL 屬性。

idl-statement

要套用 [helpstringcoNtext] 屬性的 MIDL 語句。

備註

使用ITypeLib2ITypeInfo2介面中的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);
    }
};