windows-nt/Source/XPSP1/NT/shell/ext/shtl/autoptr.cpp

37 lines
626 B
C++
Raw Normal View History

2020-09-26 03:20:57 -05:00
#include "shtl.h"
#include "autoptr.h"
//*************************************************************
//
// AutoFindHandle non-inline member functions.
//
//*************************************************************
__DATL_INLINE AutoFindHandle&
AutoFindHandle::operator = (
const AutoFindHandle& rhs
)
{
if (this != &rhs)
{
Attach(rhs.Detach());
}
return *this;
}
__DATL_INLINE void
AutoFindHandle::Close(
void
)
{
if (m_bOwns && INVALID_HANDLE_VALUE != m_handle)
{
FindClose(m_handle);
}
m_bOwns = false;
m_handle = INVALID_HANDLE_VALUE;
}