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.

71 lines
1.5 KiB

  1. // Copyright 1995-1997 Microsoft Corporation. All Rights Reserved.
  2. #if _MSC_VER > 1000
  3. #pragma once
  4. #endif
  5. #ifndef _INTERNET_H
  6. #define _INTERNET_H
  7. #define DISPID_PROGRESS 1958
  8. #ifndef __MKTYPLIB__
  9. #include <urlmon.H>
  10. #include "CtrlObj.H"
  11. class CInternetControl : public COleControl
  12. {
  13. public:
  14. CInternetControl(IUnknown * pUnkOuter,
  15. int iPrimaryDispatch,
  16. void * pMainInterface);
  17. virtual ~CInternetControl();
  18. // IUnknown methods
  19. DECLARE_STANDARD_UNKNOWN();
  20. // Call this method to start the download of a URL. 'propId' will
  21. // be passed back to your OnData below.
  22. HRESULT SetupDownload(LPOLESTR url, DISPID propId);
  23. // Derived classes implement this method. It will be called when
  24. // data has arrived for a given dispid.
  25. virtual HRESULT OnData(DISPID id, DWORD grfBSCF, IStream * bitstrm,
  26. DWORD amount) { return NOERROR; }
  27. // Derived classes can implement this method. It will be
  28. // called at various times during the download.
  29. virtual HRESULT OnProgress(DISPID id, ULONG ulProgress,
  30. ULONG ulProgressMax,
  31. ULONG ulStatusCode,
  32. LPCWSTR pwzStatusText);
  33. // Call this method to turn a URL into a Moniker.
  34. HRESULT GetAMoniker(LPOLESTR url, IMoniker **);
  35. HRESULT FireReadyStateChange(long newState);
  36. HRESULT FireProgress(ULONG dwAmount);
  37. // Override base class implementation...
  38. virtual HRESULT InternalQueryInterface(REFIID, void **);
  39. protected:
  40. HRESULT GetBindHost();
  41. IBindHost * m_host;
  42. long m_readyState;
  43. // BUGBUG: We should track all the downloads
  44. };
  45. #endif __MKTYPLIB__
  46. #endif _INTERNET_H