Click here to Skip to main content
15,899,474 members
Home / Discussions / COM
   

COM

 
QuestionHow can I access the collection of properties Pin
19-Jun-01 4:49
suss19-Jun-01 4:49 
AnswerRe: How can I access the collection of properties Pin
JoeBloggs22-Jul-01 1:35
JoeBloggs22-Jul-01 1:35 
Generalq 70-016 Pin
18-Jun-01 4:58
suss18-Jun-01 4:58 
GeneralCom Controls and overloading pretranslator() Pin
17-Jun-01 22:51
suss17-Jun-01 22:51 
GeneralCom Controls and overloading pretranslator() Pin
15-Jun-01 3:39
suss15-Jun-01 3:39 
GeneralWorer thread notification and VB Pin
15-Jun-01 2:02
suss15-Jun-01 2:02 
GeneralWhy Am I Getting Linker Errors On GetObjectContext In ATL/C++ Code Pin
14-Jun-01 11:48
suss14-Jun-01 11:48 
GeneralAggregation in Inside Com Pin
jcyoon14-Jun-01 5:35
jcyoon14-Jun-01 5:35 
I have a question about "Inside COM" by Dale Rogerson.

In aggregation part of Chapter 9

HRESULT __stdcall CA::Init()
{
IUnknown* pUnknownOuter = this ;

HRESULT hr =
::CoCreateInstance(CLSID_Component2,
pUnknownOuter,
CLSCTX_INPROC_SERVER,
IID_IUnknown, (void**)&m_pUnknownInner) ;
if (FAILED(hr))
{
return E_FAIL ;
}

hr = m_pUnknownInner->QueryInterface(IID_IY,
(void**)&m_pIY) ; if (FAILED(hr))
{
m_pUnknownInner->Release() ;
m_pUnknownInner = NULL ;
m_pIY = NULL ; // Just to be safe
return E_FAIL ;
}
pUnknownOuter->Release() ;
return S_OK ;
}

From above, I don't understand the following part.
hr = m_pUnknownInner->QueryInterface(IID_IY,
(void**)&m_pIY) ;

I guess delegating QI of Inner Component will call QI
of Outer Component and it should call Nondelegating QI
of Inner Component.

How come the following is calling Nondelegating QI?

HRESULT __stdcall CA::QueryInterface(const IID& iid,
void** ppv)
{
else if (iid == IID_IY)
{
// You can query for the interface.
return m_pUnknownInner->QueryInterface(iid,ppv) ;
}
....

Thanks,
Big Grin | :-D
GeneralRe: Aggregation in Inside Com Pin
18-Jun-01 20:29
suss18-Jun-01 20:29 
GeneralRe: Aggregation in Inside Com Pin
jcyoon21-Jun-01 8:55
jcyoon21-Jun-01 8:55 
QuestionHow to add MFC support to ATL EXE Project? Pin
14-Jun-01 5:10
suss14-Jun-01 5:10 
QuestionLimitation of .tlb import in VC++? Pin
14-Jun-01 4:03
suss14-Jun-01 4:03 
AnswerRe: Limitation of .tlb import in VC++? Pin
J Patel21-Jun-01 11:38
J Patel21-Jun-01 11:38 
Questionwhat does ESP means? Pin
14-Jun-01 3:00
suss14-Jun-01 3:00 
AnswerRe: what does ESP means? Pin
Kevin Perry (msft)19-Jun-01 19:06
Kevin Perry (msft)19-Jun-01 19:06 
Generalexception handling framework Pin
praveen prabhakar13-Jun-01 14:05
praveen prabhakar13-Jun-01 14:05 
General[dual] (un)happiness Pin
13-Jun-01 2:01
suss13-Jun-01 2:01 
GeneralRe: [dual] (un)happiness Pin
3-Jul-01 5:22
suss3-Jul-01 5:22 
GeneralRich Edit Controls - Embedding Files Pin
Steve Thresher12-Jun-01 1:51
Steve Thresher12-Jun-01 1:51 
GeneralUnable to locate assembly error Pin
11-Jun-01 22:31
suss11-Jun-01 22:31 
GeneralDefault parameter values Pin
Christian Dahl10-Jun-01 23:29
Christian Dahl10-Jun-01 23:29 
GeneralRe: Default parameter values Pin
Ulf Öhlén10-Jun-01 23:47
Ulf Öhlén10-Jun-01 23:47 
GeneralConfiguring a COM+ Server Application as an NT Service Pin
12ways10-Jun-01 22:18
12ways10-Jun-01 22:18 
QuestionHow to get the com-GUID directly from its dll or exe file Pin
9-Jun-01 19:02
suss9-Jun-01 19:02 
AnswerRe: How to get the com-GUID directly from its dll or exe file Pin
MikeG18-Jun-01 6:17
MikeG18-Jun-01 6:17 

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.