ExternalCOM.h 754 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef NULLSOFT_PODCAST_PLUGIN_EXTERNAL_HEADER
  2. #define NULLSOFT_PODCAST_PLUGIN_EXTERNAL_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #include <atomic>
  8. #include "../nu/dispatchTable.h"
  9. class ExternalCOM : public IDispatch
  10. {
  11. public:
  12. typedef enum
  13. {
  14. DISPATCH_PODCAST = 777,
  15. } DispatchCodes;
  16. protected:
  17. ExternalCOM();
  18. ~ExternalCOM();
  19. public:
  20. static HRESULT CreateInstance(ExternalCOM **instance);
  21. /* IUnknown*/
  22. STDMETHOD(QueryInterface)(REFIID riid, PVOID *ppvObject);
  23. STDMETHOD_(ULONG, AddRef)(void);
  24. STDMETHOD_(ULONG, Release)(void);
  25. protected:
  26. DISPTABLE_INCLUDE();
  27. DISPHANDLER_REGISTER(OnPodcast);
  28. std::atomic<std::size_t> _ref = 1;
  29. };
  30. #endif //NULLSOFT_PODCAST_PLUGIN_EXTERNAL_HEADER