windows-nt/Source/XPSP1/NT/termsrv/remdsk/rds/h/referenc.h

32 lines
521 B
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
#ifndef _REFERENC_H_
#define _REFERENC_H_
class REFCOUNT
{
public:
REFCOUNT();
virtual ~REFCOUNT();
DWORD AddRef();
DWORD Release();
DWORD Delete();
void OnStack() {bOnStack = TRUE;};
private:
DWORD NumRefs;
// Give 2 bits since BOOL is signed
BOOL bMarkedForDelete : 2;
BOOL bOnStack : 2;
};
class REFERENCE
{
public:
REFERENCE(REFCOUNT * _pRefCount) : pRefCount(_pRefCount) {pRefCount->AddRef();};
~REFERENCE() {pRefCount->Release();};
private:
REFCOUNT * pRefCount;
};
#endif // ! _REFERENC_H_