helpstring 屬性

[helpstring]屬性會指定用來描述其套用專案的字元字串。 您可以將 [helpstring] 屬性套用至程式庫、importlib、interface、dispinterface、module 或 coclass 語句、typedefs、properties 和 方法。

[
    helpstring(help-text-string)
    [, optional-attribute-list]
] 
element element-name
{
    definition
}

[idl-statement, helpstring(help-text-string)]

參數

help-text-string

包含解說文字之字元的零終止字串。

optional-attribute-list

零個或多個 MIDL 屬性語句。

元素

下列其中一個指示詞: library[importlib]interfacedispinterfacemoduletypedefmethodpropertycoclass

element-name

其他軟體元件可用來描述目前專案的名稱

definition

指定組成專案定義的語句。

idl-statement

MIDL 介面定義語句,例如 propgetpropput

備註

使用ITypeLibITypeInfo介面中的GetDocumentation函式來擷取說明字串。

範例

[
    uuid(1e196b20-1f3c-1069-996b-00dd010fe676),
    helpstring("Lines 1.0 Type Library"),
    version(1.0)
]
library Lines
{
     [
         uuid(1e123456-1f3c-1069-996b-00dd010fe676), 
         helpstring("Line object."),
         oleautomation,
         dual
     ]
     interface ILine : IDispatch                         
     {
         [propget, helpstring("Returns and sets RGB color.")]
         HRESULT Color([out, retval] long* ReturnVal); 
         [propput, helpstring("Returns and sets RGB color.")]
         HRESULT Color([in] long rgb);
     }
};

另請參閱

圖書館

importlib

介面

dispinterface

模組

coclass

typedef

ODL 檔案語法

ODL 檔案範例

使用 MIDL 產生類型程式庫