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.
 
 
 
 
 
 

64 lines
754 B

/*++
Copyright (C) 1998-2001 Microsoft Corporation
Module Name:
Abstract:
History:
--*/
#include "precomp.h"
#include <comutil.h>
#include <smrtptr.h>
CReleaseMe::CReleaseMe ( IUnknown *pIn)
{
m_pIn = pIn;
}
CReleaseMe::~CReleaseMe ()
{
if (m_pIn)
m_pIn->Release();
}
CFreeMe::CFreeMe ( BSTR pIn)
{
m_pIn = pIn;
}
CFreeMe::~CFreeMe ()
{
if (m_pIn)
SysFreeString(m_pIn);
}
CClearMe::CClearMe ( VARIANT *pIn)
{
m_pIn = pIn;
VariantInit(m_pIn);
}
CClearMe::~CClearMe ()
{
if (m_pIn)
VariantClear(m_pIn);
}
CRepdrvrCritSec::CRepdrvrCritSec (CRITICAL_SECTION *pCS)
{
p_cs = pCS;
EnterCriticalSection(pCS);
}
CRepdrvrCritSec::~CRepdrvrCritSec()
{
LeaveCriticalSection(p_cs);
}