共用方式為


embedded_idl

C++ Specific

Specifies that the type library is written to the .tlh file with the attribute-generated code preserved.

embedded_idl[("param")]

Parameters

  • param
    Can be one of two values:

    • emitidl: Type information imported from the typelib will be present in the IDL generated for the attributed project. This is the default and will be in effect if you do not specify a parameter to embedded_idl.

    • no_emitidl: Type information imported from the typelib will not be present in the IDL generated for the attributed project.

Example

// import_embedded_idl.cpp
// compile with: /LD
#include <windows.h>
[module(name="MyLib2")];
#import "\school\bin\importlib.tlb" embedded_idl("no_emitidl")

Remarks

END C++ Specific

See Also

Reference

#import Attributes (C/C++)

#import Directive (C/C++)