This blog is ‘s random thoughts.

4 responses to “About”

  1. 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.

    1. 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.

      1. Hi Sheng Jiang,
        Thanks for your reply. I am following the example of (https://msdn.microsoft.com/en-us/library/aa741006(v=vs.85).aspx). But I got EntryPointNotFoundException on function int CreateMoniker(string szName, IBindCtx pBC, out IMoniker ppmk, uint dwReserved) in my c# code.

        I also notice you provided example code for the following blog. Could you also share me the same or similar code?

        Thanks in advance.

  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 )

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.