Interface Inheritance
-
Hello, I am new to COM/ATL programming and have a question. If I want to inherit one interface from another I have previously written (e.g. IB : IA ) do I need to implement all of IA's methods in IB? if so is there any way I can use some technique that allows you to just directly call the IA method instead of having to re-write (as in C++). Thanks. Paul.
-
Hello, I am new to COM/ATL programming and have a question. If I want to inherit one interface from another I have previously written (e.g. IB : IA ) do I need to implement all of IA's methods in IB? if so is there any way I can use some technique that allows you to just directly call the IA method instead of having to re-write (as in C++). Thanks. Paul.
Check out Agregation
-
Check out Agregation
I have had a look at aggregation - could I override methods from my base interface using this? e.g. where IB : IA IA* pIA = null pIB->QueryInterface(IID_IA, &pIA) 1) pIA->methodA() 2) pIB->methodA() would 1) call the same thing as 2) -- I think it would if these were C++ classes (using cast instead of QI). help! :confused: :confused: :confused:
-
I have had a look at aggregation - could I override methods from my base interface using this? e.g. where IB : IA IA* pIA = null pIB->QueryInterface(IID_IA, &pIA) 1) pIA->methodA() 2) pIB->methodA() would 1) call the same thing as 2) -- I think it would if these were C++ classes (using cast instead of QI). help! :confused: :confused: :confused: