
COM Object returning COM Object Reference
I have been able to build a model of what I need to do using VB
components...but unsuccessful when attempting to use ATL which is required
since the one component must run as a System Service. I am looking for an
ATL sample that would demonstrate how to do the following:
I have an ActiveX.exe which instantiates a COM object. (Call it ObjectA)
It exposes a property which is the reference to the COM object. (call it
ObjectB)
You have a VB client which instantiates the ActiveX.exe (ObjectA).
Thus the client can say something like:
Dim MyObjectA as New ObjectA
Dim MyObjectB as ObjectB
Set MyObjectB=MyObjectA.ObjectB
msgbox MyObjectB.somemethod
When attempting to implement ObjectA in ATL we always end up with the
ObjectB property returning an Automation Error.
Any and all suggestions and pointers to a sample bit of code greatly
welcomed and appreciated.
Happy Holidays