i start this tutorial at codeproject.com about writing shell extensions, and it says i have to know about COM stuff. what the hell is COM, and how can i learn it?
i start this tutorial at codeproject.com about writing shell extensions, and it says i have to know about COM stuff. what the hell is COM, and how can i learn it?
[email protected]
Microsoft Visual Studio .NET 2003 Enterprise Architect
Windows XP Pro
Code Tags
Programming FAQ
Tutorials
At its most basic, COM is a method of programming classes with interfaces.....Instead of exporting a concrete class, you export a purely abstract class which acts as an interface.......with your main class you inherit from this interface...
Also, your exported interface inherits from IUnknown (the base COM interfaces that all COM interfaces inherit from)...this interface supports 3 abstract functions;
QueryInterface - to get other interfaces
AddRef - To increase usage count of a COM object
Release - To decrease usage count of a COM object
There are lots more things you need to learn before implementing a COM compeonent in C++ (ClassObjects, registration, apartments)....Best bet is to do some reading......Inside COM is a good book so I hear......I have Inside ATL (also by M$Press, but specific to ATL which is a tool like MFC to allow you to create COM classes quickly)...
I this it's better that you buy a book .
I suggest inside ATL . I also suggest to avoid using
MFC for bulding com Objects.
In a few words ,COM is an architecture for libraries.
It has been developed at microsoft .
The idea was to export a few standard functions from a dll ,
all this to get a pointer to a structure contained inside the library.
It's a little more complex because remote calls to funtions can be mande inside the class . It's interesting also because there is
a standard interface on wich you can "plug" what they call
containers like an IDE or whatever.
Buy a book or find stuff on the net.
This belongs on the system interface board. You are searching for Microsoft specific information. Try the Microsoft website < www.msdn.microsoft.com/library >.
On this board you write your own abstract classes, both the interfaces and the implementation.
You don't write shell extensions on the Microsoft operating system. It is illegal.
I second both of these statements, great book. ATL has a nice enough wizard for MFC people and MFC is kind of a lousy way to distribute a control.Originally posted by Frank_1974_@@
I this it's better that you buy a book .
I suggest inside ATL . I also suggest to avoid using
MFC for bulding com Objects.