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
1.5 KiB

  1. #if !defined(CTRL__OldExtension_h__INCLUDED)
  2. #define CTRL__OldExtension_h__INCLUDED
  3. #pragma once
  4. class OldExtension
  5. {
  6. // Construction
  7. public:
  8. inline OldExtension();
  9. virtual ~OldExtension();
  10. enum EOptions
  11. {
  12. oUseExisting = 0x00000001, // Use existing Extension if already attached
  13. oAsyncDestroy = 0x00000002, // Use asynchronous destruction
  14. };
  15. HRESULT Create(HGADGET hgadChange, const GUID * pguid, PRID * pprid, UINT nOptions);
  16. void Destroy();
  17. void DeleteHandle();
  18. // Implementation
  19. protected:
  20. virtual void OnRemoveExisting();
  21. virtual void OnDestroySubject();
  22. virtual void OnDestroyListener();
  23. virtual void OnAsyncDestroy();
  24. void PostAsyncDestroy();
  25. static OldExtension * GetExtension(HGADGET hgadSubject, PRID prid);
  26. private:
  27. static HRESULT CALLBACK
  28. ListenProc(HGADGET hgadCur, void * pvCur, EventMsg * pmsg);
  29. // Data
  30. protected:
  31. HGADGET m_hgadSubject; // Gadget being "extended"
  32. HGADGET m_hgadListen; // Listener for destruction
  33. PRID m_pridListen; // PRID for Extension
  34. BOOL m_fAsyncDestroy:1;
  35. // Need to destroy asynchronously
  36. static MSGID s_msgidAsyncDestroy;
  37. };
  38. #include "OldExtension.inl"
  39. #endif // CTRL__OldExtension_h__INCLUDED