This blog is ‘s random thoughts.

4 Responses to About

  1. ziqian says:

    Hi Sheng Jiang,
    I hope you all is well.
    I have read a few post about web browser control posted or answered by you. Your posts really enlighten me. I am working on bypass download dialog. I overrides necessary methods and interfaces per your posted suggestions, and the break points triggered accordingly.

    But currently I do not know how to save the file quietly. I have see examples calling RegisterCallback(pbc, url) and BindMonikerToStream(pmk, pbc). But I cannot find these methods. Example link as below.

    I am new to these base functions and events. I hope you can provide me some detailed instructions about downloading files quietly inside of idownload.download method.

    • When you create a new binding context you need to RevokeObjectParam on the previous one (the one passed to IDownloadManager) and restore (RegisterObjectParam) when your IBindStatusCallback::OnStopBinding implementation gets called. you need to return S_OK when your IBindStatusCallback::OnProgress implementation gets called with BINDSTATUS_CONTENTDISPOSITIONATTACH. for all other OnProgress calls you can to pass the call to the previous binding context . There are other places you need to forward the call, like calling OnStopBinding on the previous context in your OnStartBinding implementation. RegisterCallback is a wrapper of windows API RegisterBindStatusCallback. BindMonikerToStream is a wrapper of IMoniker::BindToStorage.

  2. there is no CreateMoniker function. You need to call different functions based on moniker type like CreateFileMoniker or CreateURLMoniker.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.