在 C++ 中,导入 .exe 是什么意思?
In C++, what does it mean to import a .exe?
在 C++ 中,我从未见过像下面这样导入 .exe
的 #import
行:
#import "C:\Program Files\Google\Google Earth\googleearth.exe"
这条线有什么作用,我该如何 interpret/understand 它?
这是一个 VC++ 扩展程序,可让您 import information from a type library。
Used to incorporate information from a type library. The content of
the type library is converted into C++ classes, mostly describing the
COM interfaces
所以在这个例子中,你的程序可以访问由 Google Earth 程序导出的 COM 接口,而不需要一个明确的头文件来定义它们(尽管我相信 GE COM API实际上已被弃用,因此这可能不适用于当前版本的软件。
在 C++ 中,我从未见过像下面这样导入 .exe
的 #import
行:
#import "C:\Program Files\Google\Google Earth\googleearth.exe"
这条线有什么作用,我该如何 interpret/understand 它?
这是一个 VC++ 扩展程序,可让您 import information from a type library。
Used to incorporate information from a type library. The content of the type library is converted into C++ classes, mostly describing the COM interfaces
所以在这个例子中,你的程序可以访问由 Google Earth 程序导出的 COM 接口,而不需要一个明确的头文件来定义它们(尽管我相信 GE COM API实际上已被弃用,因此这可能不适用于当前版本的软件。