Source code of Windows XP (NT5)
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
555 B

/*++
Copyright (C) 1999-2001 Microsoft Corporation
Module Name:
ADAPELEM.CPP
Abstract:
Implementation File
History:
--*/
#include "precomp.h"
#include <stdio.h>
#include "adapelem.h"
CAdapElement::CAdapElement( void )
: m_lRefCount(1)
{
}
CAdapElement::~CAdapElement( void )
{
}
long CAdapElement::AddRef( void )
{
return InterlockedIncrement( &m_lRefCount );
}
long CAdapElement::Release( void )
{
long lRef = InterlockedDecrement( &m_lRefCount );
if ( 0 == lRef )
{
delete this;
}
return lRef;
}