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

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: refcount.h
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //
  8. //
  9. //-----------------------------------------------------------------------------
  10. #pragma once
  11. class LTAPIENTRY CRefCount
  12. {
  13. public:
  14. CRefCount();
  15. //
  16. // Declared as STDMETHOD so as compatible with COM.
  17. //
  18. STDMETHOD_(ULONG, AddRef)(void);
  19. STDMETHOD_(ULONG, Release)(void);
  20. //
  21. //
  22. ULONG AddRef(void) const;
  23. ULONG Release(void) const;
  24. protected:
  25. virtual ~CRefCount() = 0;
  26. private:
  27. CRefCount(const CRefCount &);
  28. const CRefCount & operator=(const CRefCount &);
  29. UINT operator==(const CRefCount &);
  30. mutable UINT m_uiRefCount;
  31. };