Solved

Inheriting from a COM Implementation class

Posted on 2002-06-10
1
263 Views
Last Modified: 2010-05-18
I have a COM interface in the .idl file that looks like this:
import "oaidl.idl";
import "ocidl.idl";
import "myBase.idl";
     [
          object,
          uuid(E655B3C6-05EC-4A1B-B08F-488826F25234),
     
          helpstring("ISymbol Interface"),
          pointer_default(unique)
     ]
     interface IDerivedSymbol : IBaseSymbol
     {
      //added 2 additional methods here    

     };

[
     uuid(A66139F8-A5FE-4CC0-AE92-ECEB0019B263),
     version(1.0),
     helpstring("1.0 Type Library")
]
library SYMBOLLib
{
     importlib("stdole32.tlb");
     importlib("stdole2.tlb");
     [
          uuid(C2827C0A-16E4-4364-854A-179BE3D33A88),
          helpstring("Symbol Class")
     ]
     coclass DerivedSymbol
     {
          [default] interface IDerivedSymbol;
               
        }
};
My implementaion class of the IDerivedSymbol interface is called CDerivedSymbol
How do I inherit the implementation class of the IBaseSymbol interface,(CBaseSymbol) so I can just reuse the existing methods in that interface.

Thanks
0
Comment
Question by:borghard
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 400 total points
ID: 7067361
Check http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/com_0pyr.asp ("COM - Reusing Objects") as a good starting point into the docs - in COM, this is accomplished by using containment/delegation and aggregation.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now