Re: IUrlHistoryStg Release() not called



key88sf@xxxxxxxxx wrote:
I wonder why you don't just use IID_IUrlHistoryStg. What's tempIID
for?
I thought I need to match both 'guidService' and "riid" before doing
the QI on my class.

Actually you don't. The correct way to do it is to check guidService,
then if it is one you recognize pass riid on to QueryInterface.

In any case, even if you wanted to check both guidService and riid, why
do you use IID_IUrlHistoryStg quite happily in one case, but feel the
need to go through IIDFromString dance to obtain the _same_ IID in the
other case?

You have introduced a circular reference between your object and
WebBrowser. To break it, you will have to explicitly shut down
WebBrowser control

I am doing this. In fact, I also added an IDownloadManager
implementation in my QueryService as well, and if I keep the
IDownloadManager, but comment out the IUrlHistoryStg, everything works
fine and my refcount gets to 0 on close. It's only IUrlHistoryStg
which is causing problems.

Do you still think it's my bug?

If it is, I don't see any obvious problems in your code. It might very
well be a bug in WebBrowser - won't surprise me in the least.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.