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.

36 lines
626 B

  1. #include "shtl.h"
  2. #include "autoptr.h"
  3. //*************************************************************
  4. //
  5. // AutoFindHandle non-inline member functions.
  6. //
  7. //*************************************************************
  8. __DATL_INLINE AutoFindHandle&
  9. AutoFindHandle::operator = (
  10. const AutoFindHandle& rhs
  11. )
  12. {
  13. if (this != &rhs)
  14. {
  15. Attach(rhs.Detach());
  16. }
  17. return *this;
  18. }
  19. __DATL_INLINE void
  20. AutoFindHandle::Close(
  21. void
  22. )
  23. {
  24. if (m_bOwns && INVALID_HANDLE_VALUE != m_handle)
  25. {
  26. FindClose(m_handle);
  27. }
  28. m_bOwns = false;
  29. m_handle = INVALID_HANDLE_VALUE;
  30. }