avsramesh
July 1st, 2002, 04:02 AM
Hi,
I have some basic doubt in COM programming.
I wanted to create a com DLL with 2 compoenents in it. How can I organize the files. I can have single idl file.What about implementation files. These are to be in seperate files or can we keep in a single file. I have organized the files like this . what is the problem if declare the instance of one class in the other
simple.idl
----------
[
coclass{...}
coclass{...}
]
A.cpp
-----
class A: IA
{
}
class B: IB
{
A objA ;
}
Can we declare the instance of A in class B. Practically we can do it. But according to COM Specification can we do this? Since class B shouldn't know the implementation of class A, can we declare like this.
We had a discussion to use like this or not. Can you give me clear idea on this.
Regards,
Ramesh.amarthuluru@sisl.co.in
I have some basic doubt in COM programming.
I wanted to create a com DLL with 2 compoenents in it. How can I organize the files. I can have single idl file.What about implementation files. These are to be in seperate files or can we keep in a single file. I have organized the files like this . what is the problem if declare the instance of one class in the other
simple.idl
----------
[
coclass{...}
coclass{...}
]
A.cpp
-----
class A: IA
{
}
class B: IB
{
A objA ;
}
Can we declare the instance of A in class B. Practically we can do it. But according to COM Specification can we do this? Since class B shouldn't know the implementation of class A, can we declare like this.
We had a discussion to use like this or not. Can you give me clear idea on this.
Regards,
Ramesh.amarthuluru@sisl.co.in