Aaron
Aaron

Reputation: 2863

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

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

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

Kind regards

Upvotes: 3

Views: 12975

Answers (2)

Scott Saad
Scott Saad

Reputation: 18362

There is a wonderful article at Microsoft that seems to address this exact question. If you want to stick with straight C++ (i.e. MFC/ATL), you should check out the article as it has loads of sample code:

How to automate Excel from C++ without using MFC or #import

Upvotes: 2

kenny
kenny

Reputation: 22334

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.

Upvotes: 2

Related Questions