refcount.hpp
上传用户:xhy777
上传日期:2007-02-14
资源大小:24088k
文件大小:1k
源码类别:

系统编程

开发平台:

Visual C++

  1. /*
  2.  * refcount.hpp - RefCount class description.
  3.  */
  4. /* Types
  5.  ********/
  6. /* Classes
  7.  **********/
  8. class RefCount
  9. {
  10. private:
  11.    ULONG m_ulcRef;
  12. public:
  13.    RefCount(void);
  14.    // Virtual destructor defers to destructor of derived class.
  15.    virtual ~RefCount(void);
  16.    // IUnknown methods
  17.    ULONG STDMETHODCALLTYPE AddRef(void);
  18.    ULONG STDMETHODCALLTYPE Release(void);
  19.    // friends
  20. #ifdef DEBUG
  21.    friend BOOL IsValidPCRefCount(const RefCount *pcrefcnt);
  22. #endif
  23. };
  24. DECLARE_STANDARD_TYPES(RefCount);