I have a COM class derived from a COM interface.I also need a socket class deriving from the same interface .Is it possible to do this? .I have derived this regular socket class from interface.
Deriving an ordinary class from a COM class
Collapse
X
-
Done all the time.
Deriving youer class from a COM interface is how you implement COM in your class. That is, an object of your class is created by your user. Then that object is used with a QueryInterface to see if you support a particular interface. If you do, tthen the user typecasts your object to an object of the COM interface type. Then when COM interface calls are made, they go to your overrides.
Comment