Click here to Skip to main content
15,889,992 members
Home / Discussions / COM
   

COM

 
AnswerRe: ATL COM object.. Pin
Laxman Auti17-May-06 19:11
Laxman Auti17-May-06 19:11 
GeneralRe: ATL COM object.. Pin
Siva Sankar Koyi17-May-06 19:34
Siva Sankar Koyi17-May-06 19:34 
AnswerRe: ATL COM object.. Pin
Laxman Auti17-May-06 23:23
Laxman Auti17-May-06 23:23 
GeneralRe: ATL COM object.. Pin
Siva Sankar Koyi20-May-06 20:19
Siva Sankar Koyi20-May-06 20:19 
AnswerRe: ATL COM object.. Pin
Laxman Auti21-May-06 18:26
Laxman Auti21-May-06 18:26 
GeneralRe: ATL COM object.. Pin
Renjith Ramachandran26-May-06 4:58
Renjith Ramachandran26-May-06 4:58 
GeneralRe: ATL COM object.. Pin
Siva Sankar Koyi27-May-06 1:24
Siva Sankar Koyi27-May-06 1:24 
GeneralRe: ATL COM object.. Pin
Logan from Singapore20-Jun-06 21:57
Logan from Singapore20-Jun-06 21:57 
Hi Siva,

To do that, you can add a class like what you normally do. Thereafter is the tricky part, to remove the class and leave the interface around.

To do that, in the idl file remove the code below for your second class.

[
uuid(8D1E05B3-F610-4450-984E-4DCC4D2442E5),
helpstring("SubClass1 Class")
]
coclass SubClass1
{
[default] interface ISubClass1;
};

In your second class's header file, remove the 2 lines below. The second line will remove unnecessary register entry.

public CComCoClass<csubclass1, &clsid_subclass1="">,
DECLARE_REGISTRY_RESOURCEID(IDR_SUBCLASS1)

In the main cpp file, remove this line

OBJECT_ENTRY(CLSID_SubClass1, CSubClass1)

If I do not remember wrongly that will be it, 2 interface in one COM object. I had done this in one of my DLL and it works.

But if I do not remember wrongly again, you will not be able to see your second interface in VB or .Net whichever the client u are using. What I did, I had to pass the interface out.

Hence I will see the interface like this in VB.

dim a as FirstClass

a.SecondClass.method()

Hope I got your question right as I had also spend a lot of time on something like that.
QuestionHow create a com object successfully! Pin
hdj831117-May-06 17:32
hdj831117-May-06 17:32 
AnswerRe: How create a com object successfully! Pin
Stephen Hewitt17-May-06 18:00
Stephen Hewitt17-May-06 18:00 
AnswerRe: How create a com object successfully! Pin
Laxman Auti17-May-06 18:25
Laxman Auti17-May-06 18:25 
QuestionPIC 16F877A PROGRAMMING Pin
dbaabaa16-May-06 20:56
dbaabaa16-May-06 20:56 
AnswerRe: PIC 16F877A PROGRAMMING Pin
Roger Stoltz16-May-06 22:19
Roger Stoltz16-May-06 22:19 
AnswerRe: PIC 16F877A PROGRAMMING Pin
Steve S17-May-06 1:24
Steve S17-May-06 1:24 
GeneralRe: PIC 16F877A PROGRAMMING Pin
Roger Stoltz17-May-06 4:23
Roger Stoltz17-May-06 4:23 
GeneralRe: PIC 16F877A PROGRAMMING Pin
Steve S17-May-06 6:19
Steve S17-May-06 6:19 
GeneralRe: PIC 16F877A PROGRAMMING Pin
Roger Stoltz17-May-06 23:01
Roger Stoltz17-May-06 23:01 
GeneralRe: PIC 16F877A PROGRAMMING Pin
Steve S18-May-06 2:42
Steve S18-May-06 2:42 
GeneralRe: PIC 16F877A PROGRAMMING Pin
Roger Stoltz18-May-06 3:28
Roger Stoltz18-May-06 3:28 
GeneralRe: PIC 16F877A PROGRAMMING Pin
dbaabaa20-May-06 16:58
dbaabaa20-May-06 16:58 
QuestionAttachment problem outlook express Pin
HarishDixit16-May-06 20:27
HarishDixit16-May-06 20:27 
QuestionA Com compile error! Pin
hdj831116-May-06 16:19
hdj831116-May-06 16:19 
AnswerRe: A Com compile error! Pin
khan++16-May-06 19:08
khan++16-May-06 19:08 
AnswerRe: A Com compile error! Pin
Laxman Auti17-May-06 3:22
Laxman Auti17-May-06 3:22 
GeneralRe: A Com compile error! Pin
hdj831117-May-06 15:00
hdj831117-May-06 15:00 

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.