How to create a method in COM that returns a pointer to an interface, this needs to be done inside the IDL file.
EDIT:
How do I implement this within a class:
STDMETHODIMP CBlah::get_Something(IOtherBlah** retval){
return m_protectedvar->QueryInterface(retval);
}
STDMETHODIMP CBlah::put_Somthing(IOtherBlah* rhs){
m_protectedvar = rhs;
return S_OK;
}
The above is not working. I'm getting the following error:
cannot instantiate abstract class with[ Base=Blah ] due to following members:
'HRESULT IBlah::putref_Something(IOtherBlah*)' : is abstract