Leaked source code of windows server 2003
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.

43 lines
1.0 KiB

  1. #include "folder.h"
  2. ///////////////////////////////////////////////////////////////////////////////
  3. // IPersistFolder Methods
  4. HRESULT CControlFolder::GetClassID(LPCLSID lpClassID)
  5. {
  6. DebugMsg(DM_TRACE, TEXT("cf - pf - GetClassID() called."));
  7. // NOTE: Need to split cases here.
  8. *lpClassID = CLSID_ControlFolder;
  9. return S_OK;
  10. }
  11. HRESULT CControlFolder::Initialize(LPCITEMIDLIST pidlInit)
  12. {
  13. DebugMsg(DM_TRACE, TEXT("cf - pf - Initialize() called."));
  14. if (m_pidl)
  15. ILFree(m_pidl);
  16. m_pidl = ILClone(pidlInit);
  17. if (!m_pidl)
  18. return E_OUTOFMEMORY;
  19. return NOERROR;
  20. }
  21. ///////////////////////////////////////////////////////////////////////////////
  22. // IPersistFolder2 Methods
  23. HRESULT CControlFolder::GetCurFolder(LPITEMIDLIST *ppidl)
  24. {
  25. DebugMsg(DM_TRACE, TEXT("cf - pf - GetCurFolder() called."));
  26. if (m_pidl)
  27. return SHILClone(m_pidl, ppidl);
  28. *ppidl = NULL;
  29. return S_FALSE; // success but empty
  30. }