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
766 B

  1. /*++
  2. Copyright (C) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. ADAPELEM.H
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef __ADAPELEM_H__
  9. #define __ADAPELEM_H__
  10. class CAdapElement
  11. ////////////////////////////////////////////////////////////////////////////////
  12. //
  13. // The base class for all addref'd AMI ADAP objects
  14. //
  15. ////////////////////////////////////////////////////////////////////////////////
  16. {
  17. private:
  18. long m_lRefCount;
  19. public:
  20. CAdapElement( void );
  21. virtual ~CAdapElement(void);
  22. long AddRef( void );
  23. long Release( void );
  24. };
  25. class CAdapReleaseMe
  26. {
  27. protected:
  28. CAdapElement* m_pEl;
  29. public:
  30. CAdapReleaseMe(CAdapElement* pEl) : m_pEl(pEl){}
  31. ~CAdapReleaseMe() {if(m_pEl) m_pEl->Release();}
  32. };
  33. #endif