1
0

external.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef NULLSOFT_NOWPLAYING_PLUGIN_EXTERNAL_HEADER
  2. #define NULLSOFT_NOWPLAYING_PLUGIN_EXTERNAL_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. class ExternalDispatch : public IDispatch
  8. {
  9. public:
  10. typedef enum
  11. {
  12. DISPATCH_HIDDEN = 777,
  13. } DispatchCodes;
  14. protected:
  15. ExternalDispatch();
  16. ~ExternalDispatch();
  17. public:
  18. static HRESULT CreateInstance(ExternalDispatch **instance);
  19. static LPCWSTR GetName();
  20. public:
  21. STDMETHOD(QueryInterface)(REFIID riid, PVOID *ppvObject);
  22. STDMETHOD_(ULONG, AddRef)(void);
  23. STDMETHOD_(ULONG, Release)(void);
  24. // *** IDispatch Methods ***
  25. STDMETHOD (GetIDsOfNames)(REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgdispid);
  26. STDMETHOD (GetTypeInfo)(unsigned int itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo);
  27. STDMETHOD (GetTypeInfoCount)(unsigned int FAR * pctinfo);
  28. STDMETHOD (Invoke)(DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, EXCEPINFO FAR * pexecinfo, unsigned int FAR *puArgErr);
  29. protected:
  30. ULONG ref;
  31. };
  32. #endif //NULLSOFT_NOWPLAYING_PLUGIN_EXTERNAL_HEADER