Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Inheriting from a COM Implementation class

Posted on 2002-06-10
1
Medium Priority
?
278 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 1200 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

886 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