Leaked source code of windows server 2003
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.

45 lines
850 B

  1. //
  2. // statsink.h
  3. //
  4. // Generic ITfStatusSink object
  5. //
  6. #ifndef STATSINK_H
  7. #define STATSINK_H
  8. #include "private.h"
  9. #define SES_INVALID_COOKIE ((DWORD)(-1))
  10. typedef HRESULT (*SESCALLBACK)(void *pv, DWORD dwFlags);
  11. class CStatusSink : public ITfStatusSink
  12. {
  13. public:
  14. CStatusSink(SESCALLBACK pfnCallback, void *pv);
  15. //
  16. // IUnknown methods
  17. //
  18. STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
  19. STDMETHODIMP_(ULONG) AddRef(void);
  20. STDMETHODIMP_(ULONG) Release(void);
  21. //
  22. // ITfStatusSink
  23. //
  24. STDMETHODIMP OnStatusChange(ITfContext *pic, DWORD dwFlags);
  25. HRESULT _Advise(ITfContext *pic);
  26. HRESULT _Unadvise();
  27. private:
  28. long _cRef;
  29. ITfContext *_pic;
  30. DWORD _dwCookie;
  31. SESCALLBACK _pfnCallback;
  32. void *_pv;
  33. };
  34. #endif // STATSINK_H