Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Leaking IInternetProtocol instances

27 views
Skip to first unread message

Markus Gaisbauer

unread,
Jun 10, 2009, 11:32:18 AM6/10/09
to
I have written an Asynchronous Pluggable Protocol wrapper that
captures information about HTTP traffic in IE. Unfortunately it is
currently leaking instances of IInternetProtocol because the reference
acquired by InternetProtocolFactory::CreateInstance is never released
after the final call to UnlockRequest. Did anyone expierence the same
problem before?

Here are parts of the log file documenting the problem:

035F2A20 CInternetExplorerBHO::SetSite(Connect)

035F4908 InternetProtocolFactory::InternetProtocolFactory
035F4908 InternetProtocolFactory::AddRef 1
035F4908 InternetProtocolFactory::AddRef 2

035F4908 InternetProtocolFactory::AddRef 3
035F4908 InternetProtocolFactory::CreateInstance
035F9F70 InternetProtocol::InternetProtocol
035F9F70 InternetProtocol::AddRef 1
035F9F70 InternetProtocol::QueryInterface(IID_IInternetProtocol)
035F9F70 InternetProtocol::AddRef 2
035F4908 InternetProtocolFactory::Release 2
035F9F70 InternetProtocol::Release 1

035F9F70 InternetProtocol::QueryInterface(IID_IInternetProtocolEx)
035F9F70 InternetProtocol::AddRef 2
035F9F70 InternetProtocol::AddRef 3
035F9F70 InternetProtocol::IInternetProtocolEx::StartEx
035F9F70 InternetProtocol::Release 2
035F9F70 InternetProtocol::Release 1

035F9F70 InternetProtocol::Continue
035F9F70 InternetProtocol::Read 2048 137
035F9F70 InternetProtocol::Read 1911 0
035F9F70 InternetProtocol::Read 8055 0

035F9F70 InternetProtocol::LockRequest

035F9F70 InternetProtocol::QueryInterface(IID_IWinInetHttpInfo)
035F9F70 InternetProtocol::AddRef 2
035F9F70 InternetProtocol::IWinInetHttpInfo.QueryInfo 00000001 1
035F9F70 InternetProtocol::Release 1

035F9F70 InternetProtocol::Read 8055 0
035F9F70 InternetProtocol::Read 8055 0
035F9F70 InternetProtocol::Read 8192 0
035F9F70 InternetProtocol::Terminate
035F9F70 InternetProtocol::UnlockRequest

035F2A20 CInternetExplorerBHO::SetSite(Disconnect)

Any help is appreciated. Thanks.

Igor Tandetnik

unread,
Jun 10, 2009, 12:00:09 PM6/10/09
to
Markus Gaisbauer wrote:
> I have written an Asynchronous Pluggable Protocol wrapper that
> captures information about HTTP traffic in IE. Unfortunately it is
> currently leaking instances of IInternetProtocol because the reference
> acquired by InternetProtocolFactory::CreateInstance is never released
> after the final call to UnlockRequest.

Do you call IInternetProtocolSink::ReportResult?
--
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


Markus Gaisbauer

unread,
Jun 11, 2009, 2:24:39 PM6/11/09
to
Igor Tandetnik wrote:
> Do you call IInternetProtocolSink::ReportResult?

Yes, the original IInternetProtocol calls
IInternetProtocolSink::ReportResult after I forward
IInternetProtocol::Read for the first time. My wrapper around
IInternetProtocolSink is correctly released after forwarding
IInternetProtocol::UnlockRequest. I removed my IInternetProtocolSink
wrapper during debugging but this had no effect on the leak.

I guess I have to take another look at the Passthrough App, if it does
not suffer from the same problem.

Markus

Igor Tandetnik

unread,
Jun 11, 2009, 4:24:21 PM6/11/09
to

Not to the best of my knowlege.

0 new messages