Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In C++, what does it mean to import a .exe?

Tags:

c++

import

exe

In C++ I've never seen an #import line that imports a .exe like the following line:

#import "C:\Program Files\Google\Google Earth\googleearth.exe"

What does the line do and how can I interpret/understand it?

like image 1000
user3731622 Avatar asked Dec 25 '22 17:12

user3731622


1 Answers

It's a VC++ extension that lets you 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

So in this example, your program would have access to the COM interfaces exported by the Google Earth program without needing an explicit header file to define them (although I believe the GE COM API has actually been deprecated so this may not work with current versions of the software).

like image 113
Jonathan Potter Avatar answered Dec 28 '22 09:12

Jonathan Potter