共用方式為


包含 (C++)

指定要包含在產生的.idl 檔中的一或多個標頭檔。

[ include(
   header_file
) ];

參數

  • header_file
    您想要產生的.idl 檔內所包含的檔案名稱。

備註

包括 C++ 屬性會造成#include陳述式放到以下import "docobj.idl"產生的.idl 檔內的陳述式。

包括 C++ 屬性具有相同的功能,為 包括 MIDL 屬性。

範例

下列程式碼示範如何使用包括。 例如,檔案 include.h 只會包含 # include 陳述式。

// cpp_attr_ref_include.cpp
// compile with: /LD
[module(name="MyLib")];
[include(cpp_attr_ref_include.h)];

需求

屬性內容

適用於

全螢幕輸入

可重複

必要的屬性

None

無效的屬性

None

如需詳細資訊,請參閱屬性內容

請參閱

參考

import

importidl

includelib (C++)

importlib

其他資源

IDL 屬性

獨立屬性

Attributes Samples