Click here to Skip to main content
15,916,288 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralATL Server include issue.... Pin
nw6031218-Dec-02 18:25
nw6031218-Dec-02 18:25 
GeneralATL and GDI+ Pin
Jonathan de Halleux18-Dec-02 2:26
Jonathan de Halleux18-Dec-02 2:26 
GeneralRe: ATL and GDI+ Pin
Jörgen Sigvardsson21-Dec-02 10:21
Jörgen Sigvardsson21-Dec-02 10:21 
GeneralRe: ATL and GDI+ Pin
pba_23-Dec-02 12:54
pba_23-Dec-02 12:54 
GeneralRe: ATL and GDI+ Pin
Jonathan de Halleux24-Dec-02 2:58
Jonathan de Halleux24-Dec-02 2:58 
GeneralAttributed ATL and interfaces Pin
Chad Busche16-Dec-02 6:44
Chad Busche16-Dec-02 6:44 
GeneralRe: Attributed ATL and interfaces Pin
Jörgen Sigvardsson16-Dec-02 10:40
Jörgen Sigvardsson16-Dec-02 10:40 
GeneralRegular methods on the class object Pin
Mehdi Mousavi14-Dec-02 3:48
Mehdi Mousavi14-Dec-02 3:48 
Dear folks,

Consider 2 components, COuter that implements IOuter and CInner that implements IInner. OTOH, CInner is *auto aggregated* within COuter. By auto aggregation I mean it's aggregated within the COuter class using COM_INTERFACE_ENTRY_AUTOAGGREGATE ATL's macro.

Moreover, I've got some regular member methods on CInner, say, SetId, SetOrigin, and the like. These method *are not* on my IInner interface, they are placed as member functions of the class (as mentioned above). The IInner contains "Get" accessors, say, GetId, GetOrigin and the like so that the user could *only* obtain some information using the IInner interface. She cannot set anything on the object, since there's no "Set" accessors on IInner.

Now, I'm going to use the objects mentioned above, so that I can call those Set accessors within the program and the user could successfully get these values using the Get methods on IInner. I tried the following:

IOuterPtr spOuter;
HRESULT hRes = COuter::_CreatorClass::CreateInstance(NULL, IID_IOuter, (void **)&spOuter);
if(FAILED(hRes))
return FALSE;

CComAggObject<cinner> *pInner;
hRes = CComAggObject<cinner>::CreateInstance(spOuter, &pInner);
if(FAILED(hRes))
return FALSE;

pInner->m_contained.SetId(24950);

IInnerPtr spInner;
hRes = pInner->QueryInterface(IID_IInner, (void **)&spInner);
if(FAILED(hRes))
return FALSE;

But this is basically wrong, since the Inner object is *auto aggregated* ! Do you have any idea how I can create such things? Something like ITCallInfoChangeEvent that gives the user some informaiton via it's Get accessors, (get_Call and get_Cause to name a few) and user cannot set anything on this object, since it's got no Set accessor.

Any help would be highly appreciated,

Cheers

Mehdi Mousavi
GeneralRe: Regular methods on the class object Pin
AlexO19-Dec-02 4:25
AlexO19-Dec-02 4:25 
GeneralRe: Regular methods on the class object Pin
Mehdi Mousavi19-Dec-02 6:27
Mehdi Mousavi19-Dec-02 6:27 
GeneralATL 7.0 Creating Clients for COM Components Pin
jparsons13-Dec-02 14:56
jparsons13-Dec-02 14:56 
GeneralRe: ATL 7.0 Creating Clients for COM Components Pin
Jörgen Sigvardsson16-Dec-02 10:44
Jörgen Sigvardsson16-Dec-02 10:44 
GeneralChild Dialog and the XP visual styles Pin
Chad Busche13-Dec-02 11:32
Chad Busche13-Dec-02 11:32 
GeneralWTL Community Pin
Michael P Butler13-Dec-02 2:07
Michael P Butler13-Dec-02 2:07 
GeneralRe: WTL Community Pin
Paul Selormey13-Dec-02 2:24
Paul Selormey13-Dec-02 2:24 
GeneralRe: WTL Community Pin
Ramon Casellas13-Dec-02 2:54
Ramon Casellas13-Dec-02 2:54 
GeneralRe: WTL Community Pin
AlexO19-Dec-02 5:08
AlexO19-Dec-02 5:08 
GeneralUsing CComPtr<IHTMLDocument2Ptr>? (first time in ATL...) Pin
Joan M13-Dec-02 0:10
professionalJoan M13-Dec-02 0:10 
GeneralRe: Using CComPtr? (first time in ATL...) Pin
Paul M Watt13-Dec-02 5:20
mentorPaul M Watt13-Dec-02 5:20 
GeneralRe: Using CComPtr? (first time in ATL...) Pin
Joan M13-Dec-02 5:37
professionalJoan M13-Dec-02 5:37 
GeneralRe: Using CComPtr? (first time in ATL...) Pin
AlexO19-Dec-02 3:23
AlexO19-Dec-02 3:23 
GeneralRe: Using CComPtr? (first time in ATL...) Pin
Joan M19-Dec-02 3:44
professionalJoan M19-Dec-02 3:44 
Generallist of VARIANT Pin
bojinyu12-Dec-02 2:31
bojinyu12-Dec-02 2:31 
GeneralRe: list of VARIANT Pin
Daniel Strigl12-Dec-02 2:49
Daniel Strigl12-Dec-02 2:49 
GeneralRe: list of VARIANT Pin
bojinyu12-Dec-02 3:22
bojinyu12-Dec-02 3:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.