Solved

Inheriting from a COM Implementation class

Posted on 2002-06-10
1
275 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

739 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