Click here to Skip to main content
16,015,032 members
Home / Discussions / COM
   

COM

 
GeneralAccess Internet Explorer Pin
N4t1v32-Oct-02 8:08
sussN4t1v32-Oct-02 8:08 
GeneralRe: Access Internet Explorer Pin
Stephane Rodriguez.2-Oct-02 9:12
Stephane Rodriguez.2-Oct-02 9:12 
GeneralRe: Access Internet Explorer Pin
Todd Smith7-Oct-02 12:32
Todd Smith7-Oct-02 12:32 
GeneralMIDL changes property 'Count' to 'count' Pin
Anonymous1-Oct-02 7:22
Anonymous1-Oct-02 7:22 
GeneralRe: MIDL changes property 'Count' to 'count' Pin
Vi23-Oct-02 4:12
Vi23-Oct-02 4:12 
GeneralRe: MIDL changes property 'Count' to 'count' Pin
Vi23-Oct-02 17:37
Vi23-Oct-02 17:37 
GeneralCOM design question Pin
Jeremy Pullicino1-Oct-02 4:08
Jeremy Pullicino1-Oct-02 4:08 
GeneralRe: COM design question Pin
Ranjan Banerji1-Oct-02 4:33
Ranjan Banerji1-Oct-02 4:33 
Oh boy!... you just cannot ask a simple question can you....
Smile | :)

Well, first of all there is no ptoblem at all with two objects with exactly the same interface. But that is really not the main issue behind your design requirements.

Now the part of object C creating an instance of A or B, can be handled in several ways.

I don't think either Containment or Aggregation will help. (COM gurus will be able to answer that better).

So you can have a switch in your object C that either creates A or B. But that just does not look too elegant.

You could consider creating a single COM object D. D provides the COM interface to a base class Z. From Z you derive A and B which provide the different implementations for the interfaces.

Now somewhere in your COM D object you will have Z = new A or Z = new B and then you use Z->Interface().

So you have a single COM object not two. But inside the COM object you use standard OO polymorphism to handle to different implementations of A and B.

I think I may be rambling now. But you may want to think along this path.

Hope this helped. Smile | :)

GeneralRe: COM design question Pin
Mike Player1-Oct-02 4:46
Mike Player1-Oct-02 4:46 
GeneralRe: COM design question Pin
Stefan Pedersen1-Oct-02 4:48
Stefan Pedersen1-Oct-02 4:48 
GeneralRe: COM design question Pin
Jörgen Sigvardsson4-Oct-02 10:47
Jörgen Sigvardsson4-Oct-02 10:47 
GeneralRe: COM design question Pin
peterchen1-Oct-02 5:18
peterchen1-Oct-02 5:18 
GeneralRe: COM design question Pin
Steve Hopkins1-Oct-02 7:10
Steve Hopkins1-Oct-02 7:10 
GeneralRe: COM design question Pin
Vi23-Oct-02 4:39
Vi23-Oct-02 4:39 
GeneralRe: COM design question Pin
ZBUILDER13-Oct-02 17:30
ZBUILDER13-Oct-02 17:30 
GeneralCoInitializeSecurity Pin
Jason Henderson1-Oct-02 3:03
Jason Henderson1-Oct-02 3:03 
GeneralI hate string types!!! Pin
LukeV30-Sep-02 9:15
LukeV30-Sep-02 9:15 
GeneralRe: I hate string types!!! Pin
Ernest Laurentin30-Sep-02 17:59
Ernest Laurentin30-Sep-02 17:59 
GeneralRe: I hate string types!!! Pin
peterchen1-Oct-02 6:17
peterchen1-Oct-02 6:17 
GeneralRe: I hate string types!!! Pin
Anonymous23-Oct-02 10:31
Anonymous23-Oct-02 10:31 
QuestionWhy do I get this error? Pin
LukeV30-Sep-02 7:31
LukeV30-Sep-02 7:31 
AnswerRe: Why do I get this error? Pin
Stephane Rodriguez.30-Sep-02 7:53
Stephane Rodriguez.30-Sep-02 7:53 
GeneralActiveX, IE and admin rights Pin
Paul Selormey29-Sep-02 18:35
Paul Selormey29-Sep-02 18:35 
GeneralRe: ActiveX, IE and admin rights Pin
KaЯl4-Oct-02 5:23
KaЯl4-Oct-02 5:23 
QuestionHelp wanted!!! Receiving onmousemove events in web documents (frames as well)? Pin
Tommy Svensson27-Sep-02 0:40
Tommy Svensson27-Sep-02 0:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.