Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.7 KiB

  1. #ifndef __CDLBSC_INCLUDED__
  2. #define __CDLBSC_INCLUDED__
  3. #include "init.h"
  4. #include <urlmon.h>
  5. #define DOWNLOAD_PROGRESS 0x9001
  6. #define DOWNLOAD_COMPLETE 0x9002
  7. class CodeDownloadBSC : public IBindStatusCallback, public IWindowForBindingUI {
  8. public:
  9. CodeDownloadBSC( HWND hwnd, HWND hdlg, LPITEMIDLIST pidlUpdate = NULL );
  10. virtual ~CodeDownloadBSC();
  11. HRESULT Abort();
  12. // IUnknown methods
  13. STDMETHODIMP QueryInterface( REFIID ridd, void **ppv );
  14. STDMETHODIMP_( ULONG ) AddRef();
  15. STDMETHODIMP_( ULONG ) Release();
  16. // IBindStatusCallback methods
  17. STDMETHODIMP GetBindInfo(DWORD *grfBINDINFOF, BINDINFO *pbindinfo);
  18. STDMETHODIMP OnStartBinding(DWORD grfBSCOption, IBinding *pib);
  19. STDMETHODIMP GetPriority(LONG *pnPriority);
  20. STDMETHODIMP OnProgress(ULONG ulProgress, ULONG ulProgressMax,
  21. ULONG ulStatusCode, LPCWSTR szStatusText);
  22. STDMETHODIMP OnDataAvailable(DWORD grfBSCF, DWORD dwSize,
  23. FORMATETC *pformatetc,
  24. STGMEDIUM *pstgmed);
  25. STDMETHODIMP OnObjectAvailable(REFIID riid, IUnknown *punk);
  26. STDMETHODIMP OnLowResource(DWORD dwReserved);
  27. STDMETHODIMP OnStopBinding(HRESULT hresult, LPCWSTR szError);
  28. // IWindowForBindingUI
  29. STDMETHODIMP GetWindow( REFGUID rguidReason, HWND __RPC_FAR *phwnd );
  30. HWND _hdlg; // progress dialog
  31. protected:
  32. IBinding *_pIBinding; // ibinding from code dl'er
  33. DWORD _cRef;
  34. HWND _hwnd; // owner window
  35. LPITEMIDLIST _pidlUpdate; // pidl for item we are updating
  36. };
  37. #endif