Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing COM interface from C or C++ in Windows environment

Tags:

c++

c

windows

com

I'm relatively new to the Component Object Model specification - I have a simple question:

  • How can I access a COM interface from a C or C++ application

For instance, accessing Microsoft Excel COM interface to perform basic operations, without user intervention.

Kind regards

like image 869
Aaron Avatar asked Dec 04 '25 08:12

Aaron


1 Answers

I would suggest looking into ATL if you are using C++, and using C++ if using C. It is very easy to use the #import construct to access COM objects in DLLs or EXEs.

like image 197
kenny Avatar answered Dec 07 '25 00:12

kenny



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!