|
-
November 10th, 2008, 12:58 AM
#3
Re: ActiveX and IObjectSafetySiteLock,IObjectWithSite
hello,
i solved this problem
just to help others if they ever encounter this. i am posting the solution
there were couple of problems in the code.
(1) as i was using the MFC ActiveX control so the activeX control class gets inherited from the COleControl. now this is what MSDN says about it that you have to use IOleObject and IObjectWithSite exclusively. means you could not use the both interfaces so the call to "STDMETHOD(SetSite)(IUnknown *pUnkSite);" will not happen. as we have already used IOleObject.
now how did i resolve this problem is i extracted all related functions from the sitelock template class the wrap them in a diffrent Class. and then referenced this class at what places it was required. the only thing i want to get was the URL of the control and the Zone setting. which was presented in the "Sitelock.h" template class. i added this code to my class with correctly passing the interface pointers. and all done!!
codeguru is the one of best place to spend time with, thanks you All!!
thanks
Dingo
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
|