
How to access a member variable of a class from other class
Hi all...
To state simply the problem. I have an ATL object that has 2 interfaces,
each one has the corresponding class, for example,
CObject_1
IObject_1
CObject_2
IObject_2
CObject_1 need to access a public member variable in CObject_2, how can I do
it? I tried declaring in CObject_1 an object of type CObject_2 but it didn't
compile because of the definition of the CObject_2 class... for instance:
class ATL_NO_VTABLE CObject_2 :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CObject_2, &CLSID_Object_2>,
public IDispatchImpl<IObject_2, &IID_IObject_2, &LIBID_ICFILELib>
{
DECLARE_NO_REGISTRY()
DECLARE_NOT_AGGREGATABLE(CObject_2)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CObject_2)
COM_INTERFACE_ENTRY(IObject_2)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
Quote:
};
CObject_1 has the same skeleton
Any one can help?
Thanks a los in advance
Jaime