1
0

Winamp.h 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #pragma once
  2. #include <ocidl.h>
  3. #include <exdisp.h>
  4. #include <objsafe.h>
  5. class Winamp : public IObjectWithSite,
  6. public IDispatch,
  7. public IOleObject,
  8. public IPersistStorage,
  9. public IDataObject,
  10. public IObjectSafety
  11. {
  12. public:
  13. Winamp();
  14. /* IUnknown */
  15. HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject);
  16. ULONG STDMETHODCALLTYPE AddRef(void);
  17. ULONG STDMETHODCALLTYPE Release(void);
  18. // *** IDispatch Methods ***
  19. STDMETHOD (GetIDsOfNames)(REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgdispid);
  20. STDMETHOD (GetTypeInfo)(unsigned int itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo);
  21. STDMETHOD (GetTypeInfoCount)(unsigned int FAR * pctinfo);
  22. STDMETHOD (Invoke)(DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, EXCEPINFO FAR * pexecinfo, unsigned int FAR *puArgErr);
  23. /* IOleObject */
  24. HRESULT STDMETHODCALLTYPE SetClientSite(IOleClientSite *pClientSite);
  25. HRESULT STDMETHODCALLTYPE GetClientSite(IOleClientSite **ppClientSite);
  26. HRESULT STDMETHODCALLTYPE SetHostNames(LPCOLESTR szContainerApp,LPCOLESTR szContainerObj);
  27. HRESULT STDMETHODCALLTYPE Close(DWORD dwSaveOption);
  28. HRESULT STDMETHODCALLTYPE SetMoniker(DWORD dwWhichMoniker,IMoniker *pmk);
  29. HRESULT STDMETHODCALLTYPE GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker,IMoniker **ppmk);
  30. HRESULT STDMETHODCALLTYPE InitFromData(IDataObject *pDataObject,BOOL fCreation,DWORD dwReserved);
  31. HRESULT STDMETHODCALLTYPE GetClipboardData(DWORD dwReserved,IDataObject **ppDataObject);
  32. HRESULT STDMETHODCALLTYPE DoVerb(LONG iVerb,LPMSG lpmsg,IOleClientSite *pActiveSite,LONG lindex, HWND hwndParent, LPCRECT lprcPosRect);
  33. HRESULT STDMETHODCALLTYPE EnumVerbs(IEnumOLEVERB **ppEnumOleVerb);
  34. HRESULT STDMETHODCALLTYPE Update(void);
  35. HRESULT STDMETHODCALLTYPE IsUpToDate(void);
  36. HRESULT STDMETHODCALLTYPE GetUserClassID(CLSID *pClsid);
  37. HRESULT STDMETHODCALLTYPE GetUserType(DWORD dwFormOfType,LPOLESTR *pszUserType);
  38. HRESULT STDMETHODCALLTYPE SetExtent(DWORD dwDrawAspect,SIZEL *psizel);
  39. HRESULT STDMETHODCALLTYPE GetExtent(DWORD dwDrawAspect,SIZEL *psizel);
  40. HRESULT STDMETHODCALLTYPE Advise(IAdviseSink *pAdvSink,DWORD *pdwConnection);
  41. HRESULT STDMETHODCALLTYPE Unadvise(DWORD dwConnection);
  42. HRESULT STDMETHODCALLTYPE EnumAdvise(IEnumSTATDATA **ppenumAdvise);
  43. HRESULT STDMETHODCALLTYPE GetMiscStatus(DWORD dwAspect,DWORD *pdwStatus);
  44. HRESULT STDMETHODCALLTYPE SetColorScheme(LOGPALETTE *pLogpal);
  45. /* IPersistStorage */
  46. HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
  47. HRESULT STDMETHODCALLTYPE IsDirty(void);
  48. HRESULT STDMETHODCALLTYPE InitNew(IStorage *pStg);
  49. HRESULT STDMETHODCALLTYPE Load(IStorage *pStg);
  50. HRESULT STDMETHODCALLTYPE Save(IStorage *pStgSave, BOOL fSameAsLoad);
  51. HRESULT STDMETHODCALLTYPE SaveCompleted(IStorage *pStgNew);
  52. HRESULT STDMETHODCALLTYPE HandsOffStorage(void);
  53. /* IDataStorage */
  54. HRESULT STDMETHODCALLTYPE GetData(FORMATETC *pformatetcIn,STGMEDIUM *pmedium);
  55. HRESULT STDMETHODCALLTYPE GetDataHere(FORMATETC *pformatetc,STGMEDIUM *pmedium);
  56. HRESULT STDMETHODCALLTYPE QueryGetData(FORMATETC *pformatetc);
  57. HRESULT STDMETHODCALLTYPE GetCanonicalFormatEtc(FORMATETC *pformatectIn,FORMATETC *pformatetcOut);
  58. HRESULT STDMETHODCALLTYPE SetData(FORMATETC *pformatetc,STGMEDIUM *pmedium,BOOL fRelease);
  59. HRESULT STDMETHODCALLTYPE EnumFormatEtc(DWORD dwDirection,IEnumFORMATETC **ppenumFormatEtc);
  60. HRESULT STDMETHODCALLTYPE DAdvise(FORMATETC *pformatetc,DWORD advf,IAdviseSink *pAdvSink,DWORD *pdwConnection);
  61. HRESULT STDMETHODCALLTYPE DUnadvise(DWORD dwConnection);
  62. HRESULT STDMETHODCALLTYPE EnumDAdvise(IEnumSTATDATA **ppenumAdvise);
  63. /* IObjectSafety */
  64. HRESULT STDMETHODCALLTYPE GetInterfaceSafetyOptions(REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions);
  65. HRESULT STDMETHODCALLTYPE SetInterfaceSafetyOptions(REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions);
  66. /* IObjectWithSite */
  67. HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void** ppvSite);
  68. HRESULT STDMETHODCALLTYPE SetSite(IUnknown*);
  69. STDMETHOD (Test)(WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, unsigned int FAR *puArgErr);
  70. STDMETHOD (getVersion)(WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, unsigned int FAR *puArgErr);
  71. private:
  72. LONG refCount;
  73. IOleClientSite *client_site;
  74. private:
  75. IWebBrowser2 *webBrowser_;
  76. IConnectionPointContainer *connectionPointContainer;
  77. DWORD cookie_;
  78. IDispatch *document_;
  79. };