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.

50 lines
2.2 KiB

  1. //+-------------------------------------------------------------------------
  2. // Notify.h
  3. //--------------------------------------------------------------------------
  4. #ifndef __OENOTIFY_H
  5. #define __OENOTIFY_H
  6. #include <notify.h>
  7. //+-------------------------------------------------------------------------
  8. // CNotify
  9. //--------------------------------------------------------------------------
  10. class CNotify : public INotify
  11. {
  12. public:
  13. //+---------------------------------------------------------------------
  14. // Construction
  15. //----------------------------------------------------------------------
  16. CNotify(void);
  17. ~CNotify(void);
  18. //+---------------------------------------------------------------------
  19. // Construction
  20. //----------------------------------------------------------------------
  21. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  22. STDMETHODIMP_(ULONG) AddRef(void);
  23. STDMETHODIMP_(ULONG) Release(void);
  24. //+---------------------------------------------------------------------
  25. // Construction
  26. //----------------------------------------------------------------------
  27. STDMETHODIMP Initialize(LPCSTR pszName);
  28. STDMETHODIMP Register(HWND hwndNotify, HWND hwndThunk, BOOL fExternal);
  29. STDMETHODIMP Unregister(HWND hwndNotify);
  30. STDMETHODIMP Lock(HWND hwnd);
  31. STDMETHODIMP Unlock(void);
  32. STDMETHODIMP NotificationNeeded(void);
  33. STDMETHODIMP DoNotification(UINT uWndMsg, WPARAM wParam, LPARAM lParam, DWORD dwFlags);
  34. private:
  35. //+---------------------------------------------------------------------
  36. // Private Data
  37. //----------------------------------------------------------------------
  38. LONG m_cRef; // Reference Count
  39. HANDLE m_hMutex; // Handle to the memory mapped file mutex
  40. HANDLE m_hFileMap; // Handle to the memory mapped file
  41. LPNOTIFYWINDOWTABLE m_pTable; // Pointer into memory mapped file view
  42. BOOL m_fLocked; // This object is currently in m_hMutex
  43. HWND m_hwndLock; // hwnd that called ::Lock
  44. };
  45. #endif // __NOTIFY_H