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.

46 lines
921 B

  1. //
  2. // pkes.h
  3. //
  4. // Generic ITfPreservedKeyNotifySink object
  5. //
  6. #ifndef PKES_H
  7. #define PKES_H
  8. #include "private.h"
  9. #define PKES_INVALID_COOKIE ((UINT_PTR)(-1))
  10. typedef HRESULT (*PKESCALLBACK)(const TF_PRESERVEDKEY *pprekey, void *pv);
  11. class CPreservedKeyNotifySink : public ITfPreservedKeyNotifySink
  12. {
  13. public:
  14. CPreservedKeyNotifySink(PKESCALLBACK 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. // ITfPreservedKeyNotifySink
  23. //
  24. STDMETHODIMP OnUpdated(const TF_PRESERVEDKEY *pprekey);
  25. HRESULT _Advise(ITfThreadMgr *ptim);
  26. HRESULT _Unadvise();
  27. private:
  28. long _cRef;
  29. ITfThreadMgr *_ptim;
  30. DWORD _dwCookie;
  31. PKESCALLBACK _pfnCallback;
  32. void *_pv;
  33. };
  34. #endif // PKES_H