Click to See Complete Forum and Search --> : COM Object Communication


cflanman
May 10th, 1999, 08:31 AM
How do you expose the interface of COM ObjectA to COM ObjectB? The GUI wants to "send" business ObjectA to business ObjectB (as in "ObjectB.DoThis(ObjectA)"), so that ObjectB can call ObjectA's services.

nms
May 10th, 1999, 01:01 PM
Since ObjectA's interface will be derived from IUnKnown, u could as well have the following function in ObjectB
ObjectB::DoThis(IUnknown* pIU)
this way the function DoThis can make calls provided by the interface of ObjectA.
(of course if it is in C++, u have to include
the header of the required interface of ObjectA)

Am i right ?
do reply...

nms

sinisa
May 10th, 1999, 03:59 PM
well.. i believe this could work.. But now let`s make it little bit more spicy.. How to use well known Method from ObjectA without importing *.tlb of that object?

sini

cflanman
May 11th, 1999, 08:09 AM
Thanks for your help! I'll try it.

cflanman
May 11th, 1999, 08:09 AM
OK, I'll bite: How?