Click to See Complete Forum and Search --> : create a com object


avi123
December 16th, 2003, 03:10 AM
Hello,

I use VC.NET 2003 enviroment, and I was wondering how do I create a project of type COM object

or simply what kind of project do I need to choose in order to create a com object (without MFC support)

thanks
Avi

vicodin451
December 16th, 2003, 07:14 AM
I usually choose an "ATL Project".

avi123
December 16th, 2003, 07:38 AM
is there other choice?

what is the difference between ATL & COM?

thanks
avi

vicodin451
December 16th, 2003, 07:44 AM
ATL greatly simplifies many things related to COM.
MSDN has tons of information on both COM and ATL.
In addition, the following books are quite good:

"ATL Internals" by Brent Rector and Chris Sells
"Essential COM" by Don Box
"Effective COM" by Don Box, Keith Brown, Tim Ewald, and Chris Sells

avi123
December 16th, 2003, 09:35 AM
is there an a connection between ATL & MFC?

because I cann't use MFC can I still use ATL?

thanks
Avi

vicodin451
December 16th, 2003, 09:38 AM
Originally posted by avi123
is there an a connection between ATL & MFC?

because I cann't use MFC can I still use ATL?

thanks
Avi

Yes.
You can certainly use ATL without using MFC. One of the touted benefits of ATL is that it is "lightweight" since much of it is template based. You don't get the whole kitchen sink if all you need is a rubber washer.

avi123
December 16th, 2003, 09:43 AM
in the wizard threre was a check box use/not use attributes
what does it mean?

thanks
avi

vicodin451
December 16th, 2003, 09:53 AM
Originally posted by avi123
in the wizard threre was a check box use/not use attributes
what does it mean?

thanks
avi
You can use the built-in help feature of VC++ .NET to determine what it means.

avi123
December 16th, 2003, 10:53 AM
thanks
but I don't think I really understood it

I guess I'll have to look for some good reading matirial,
I need to create a COM object and at the moment I haven't got a clue

any sugestion, where to start?
I have some libs with a few class, and I need to export one of its function using COM object

thanks
Avi

vicodin451
December 16th, 2003, 10:57 AM
Originally posted by avi123
thanks
but I don't think I really understood it

I guess I'll have to look for some good reading matirial,
I need to create a COM object and at the moment I haven't got a clue

any sugestion, where to start?
I have some libs with a few class, and I need to export one of its function using COM object

thanks
Avi

You could start by defining the interface(s) the COM object will implement.
Dr. GUI (I believe) on MSDN goes into the basics of how to create a COM object in one of his articles. I would suggest starting there.