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.

47 lines
617 B

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. REFCOUNT.H
  5. History:
  6. --*/
  7. #pragma once
  8. class LTAPIENTRY CRefCount
  9. {
  10. public:
  11. CRefCount();
  12. //
  13. // Declared as STDMETHOD so as compatible with COM.
  14. //
  15. STDMETHOD_(ULONG, AddRef)(void);
  16. STDMETHOD_(ULONG, Release)(void);
  17. //
  18. //
  19. ULONG AddRef(void) const;
  20. ULONG Release(void) const;
  21. protected:
  22. virtual ~CRefCount() = 0;
  23. private:
  24. CRefCount(const CRefCount &);
  25. const CRefCount & operator=(const CRefCount &);
  26. UINT operator==(const CRefCount &);
  27. mutable UINT m_uiRefCount;
  28. };