mirror of https://github.com/tongzx/nt5src
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.
34 lines
533 B
34 lines
533 B
// File: refcount.h
|
|
|
|
#ifndef _REFCOUNT_H_
|
|
#define _REFCOUNT_H_
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
class RefCount
|
|
{
|
|
protected:
|
|
ULONG m_ulcRef;
|
|
|
|
#ifdef DEBUG
|
|
BOOL m_fTrack;
|
|
#endif
|
|
|
|
public:
|
|
RefCount(void);
|
|
// Virtual destructor defers to destructor of derived class.
|
|
virtual ~RefCount(void);
|
|
|
|
// IUnknown
|
|
ULONG STDMETHODCALLTYPE AddRef(void);
|
|
ULONG STDMETHODCALLTYPE Release(void);
|
|
|
|
#ifdef DEBUG
|
|
VOID SetTrack(BOOL fTrack) {m_fTrack = fTrack;}
|
|
#endif
|
|
};
|
|
|
|
|
|
#endif /* _REFCOUNT_H_ */
|