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.

60 lines
1.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1998.
  5. //
  6. // File: I P E R S I S T F 2 . C P P
  7. //
  8. // Contents: IPersistFolder2 interface for CConnectionFolder
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 16 Mar 1998
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "pch.h"
  16. #pragma hdrstop
  17. #include "foldinc.h" // Standard shell\folder includes
  18. //+---------------------------------------------------------------------------
  19. //
  20. // Member: CConnectionFolder::GetCurFolder
  21. //
  22. // Purpose: Return a copy of the item id list for the current folder.
  23. //
  24. // Arguments:
  25. // ppidl [out] Return pointer for the pidl
  26. //
  27. // Returns:
  28. //
  29. // Author: jeffspr 16 Mar 1998
  30. //
  31. // Notes:
  32. //
  33. STDMETHODIMP CConnectionFolder::GetCurFolder(
  34. OUT LPITEMIDLIST *ppidl)
  35. {
  36. TraceFileFunc(ttidShellFolder);
  37. HRESULT hr = NOERROR;
  38. *ppidl = m_pidlFolderRoot.TearOffItemIdList();
  39. if (NULL == *ppidl)
  40. {
  41. hr = E_OUTOFMEMORY;
  42. goto Exit;
  43. }
  44. // NOTE: if this is being invoked remotely, we assume that IRemoteComputer
  45. // is invoked *before* IPersistFolder2.
  46. Exit:
  47. TraceHr(ttidShellFolder, FAL, hr, FALSE, "CConnectionFolder::GetCurFolder");
  48. return hr;
  49. }