|
-
May 20th, 1999, 10:59 PM
#1
ATLadvise succeeding with m_vec empty
Can ATladvise succeed(HRESULT hr) without adding the IUnknown pointer in the ConnectionPointContainer array m_vec.
If so how do i go about finding the problem which is preventing any callbacks from occuring ?
-
May 21st, 1999, 01:55 AM
#2
Re: ATLadvise succeeding with m_vec empty
If you call AtlAdvise, you attempt to be notified by advisor, so the advisor must have a collection of all connections (m_vec).
Sincerely, Mihai
-
May 22nd, 1999, 11:55 PM
#3
Re: ATLadvise succeeding with m_vec empty
Yes I understand the theory. But can the AtlAdvise return a HRESULT which is succeeded but still fail to add the IUnknown of the sink in the source's collection of IUnknown pointers ?
-
June 1st, 1999, 01:52 AM
#4
Re: ATLadvise succeeding with m_vec empty
yes, i experience this b4. but dunno why this happened.
adachi
-
June 2nd, 1999, 07:29 AM
#5
Re: ATLadvise succeeding with m_vec empty
I solved the problem I had as below
IOutgoing is the outgoing interface implemented by the client
The following works
IUnknown* pUnk=NULL;IOutgoing* pOutgoing=NULL;
for(int nClient=0;nClient<m_vec.GetSize();nClient++)
{
pUnk=m_vec.GetAt(nClient);
pOutgoing=(IOutgoing*)pUnk;
pOutgoing->EventSend(Param);
}
The following fails
IUnknown** ppUnk=NULL;IOutgoing* pOutgoing=NULL;
for(int nClient=0;nClient<m_vec.GetSize();nClient++)
{
*ppUnk=m_vec.GetAt(nClient);
pOutgoing=(IOutgoing*)*ppUnk;
pOutgoing->EventSend(Param);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|