|
-
August 1st, 2000, 04:35 PM
#1
Infinite loop from MSDN
Well obviously the folks at MSDN know what they are doing, so my only conclusion is that I am screwing something up. Anyway, I'm tring to override IObjectSafety by applying an MSDN article. Here is one of the overriding methods:
STDMETHODIMP CMyCtrl::XObjSafety::QueryInterface(REFIID iid, LPVOID far* ppvObj)
{
METHOD_MANAGE_STATE(CMyCtrl, ObjSafety)
ASSERT_VALID(pThis);
return pThis->m_xObjSafety.QueryInterface ( iid, ppvObj);
}
And that looks like it will cause an inf. loop (based on my understanding of the involved MACROS and pThis), which is precisely what it does. Does anyone know a good way to implement the IUnkown functions, or a better way to override interfaces in an MFC ActiveX control? Thanks in advance for any light you can shed on the matter.
-
August 1st, 2000, 04:42 PM
#2
Re: Infinite loop from MSDN
Ok, I got it to work, by using
pThis->ExternalQueryInterface(&iid,pvvObj);
Apparently this calls the base class...?!?!?? Im still confused, but at least less stuck.
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
|