OMCOM.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef NULLSOFT_OMCOMH
  2. #define NULLSOFT_OMCOMH
  3. #include <ocidl.h>
  4. class ConfigCOM;
  5. class ifc_omservice;
  6. class OMCOM : public IDispatch
  7. {
  8. public:
  9. OMCOM();
  10. ~OMCOM();
  11. STDMETHOD(QueryInterface)(REFIID riid, PVOID *ppvObject);
  12. STDMETHOD_(ULONG, AddRef)(void);
  13. STDMETHOD_(ULONG, Release)(void);
  14. // *** IDispatch Methods ***
  15. STDMETHOD (GetIDsOfNames)(REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgdispid);
  16. STDMETHOD (GetTypeInfo)(unsigned int itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo);
  17. STDMETHOD (GetTypeInfoCount)(unsigned int FAR * pctinfo);
  18. STDMETHOD (Invoke)(DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, EXCEPINFO FAR * pexecinfo, unsigned int FAR *puArgErr);
  19. private:
  20. STDMETHOD (IsOmSubscribed)(WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, unsigned int FAR *puArgErr);
  21. STDMETHOD (AddOmSubscribed)(WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, unsigned int FAR *puArgErr);
  22. STDMETHOD (Subscribe)(WORD wFlags, DISPPARAMS FAR *pdispparams, VARIANT FAR *pvarResult, unsigned int FAR *puArgErr);
  23. HRESULT FindService(VARIANTARG *pArg, ifc_omservice **service);
  24. public:
  25. INT GetSerialNumber(BOOL fForceRead);
  26. HRESULT SetSerialNumber(INT sn);
  27. HRESULT Publish();
  28. protected:
  29. ConfigCOM *config;
  30. INT serialNumber;
  31. UINT publishCookie;
  32. };
  33. #endif