This blog is Sheng Jiang‘s random thoughts.
Search
-
Sheng Jiang 蒋晟
Microsoft MVP in Visual C , 2004- Forum moderator of the Visual C++ and .Net forums on CSDN Forum moderator of Chinese forums on Microsoft's MSDN forums
Personal Links
Tags
- .NET Framework
- Active Template Library
- ActiveX
- ActiveX Data Objects
- ActiveX Document
- Application programming interface
- ASP.Net
- Assembly language
- bug
- C#
- C++/CLI
- Call stack
- clipboard
- Comment (computer programming)
- Common Language Runtime
- Component Object Model
- Console application
- CSDN
- Deployment
- Document Object Model
- Exception handling
- File Transfer Protocol
- Google Chrome
- Hardware
- Integer (computer science)
- Internet Explorer
- Internet Explorer 6
- Internet Explorer 7
- Internet Explorer 8
- Internet Explorer 9
- Internet Information Services
- Managed C++
- Metadata
- MFC
- Microcontroller
- Microsoft
- Microsoft Answers
- Microsoft Award
- Microsoft Foundation Class Library
- Microsoft Most Valuable Professional
- Microsoft Visual Studio
- Microsoft Windows
- Office Live
- Operating Systems
- Redistributable
- Registry
- Regmon
- Rootkit
- Security Programming
- security zone settings
- Service pack
- Silverlight
- Software development kit
- Standard Template Library
- Taskbar
- Trident (layout engine)
- User agent
- Visual Basic
- Visual C++
- Visual Studio
- Web browser
- WebBrowser Control
- Web Service
- Where is the forum for
- windows 8 Developer Preview
- Windows Explorer
- Windows Forms
- Windows Media Player
- Windows Presentation Foundation
- Windows SDK
- Windows Server 2003
- Windows Shell
- Windows Update
- Windows Vista
- Windows XP
Translate
Blogroll
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.
https://stackoverflow.com/questions/13362922/windows-forms-webbrowswer-control-with-idownloadmanager?from=singlemessage&isappinstalled=0
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.
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?
http://blog.csdn.net/zslefour/article/details/21389969
Thanks in advance.
there is no CreateMoniker function. You need to call different functions based on moniker type like CreateFileMoniker or CreateURLMoniker.