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.

56 lines
1.3 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 CUPnPDeviceFolder
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 16 Mar 1998
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "pch.h"
  16. #pragma hdrstop
  17. //+---------------------------------------------------------------------------
  18. //
  19. // Member: CUPnPDeviceFolder::GetCurFolder
  20. //
  21. // Purpose: Return a copy of the item id list for the current folder.
  22. //
  23. // Arguments:
  24. // ppidl [out] Return pointer for the pidl
  25. //
  26. // Returns:
  27. //
  28. // Author: jeffspr 16 Mar 1998
  29. //
  30. // Notes:
  31. //
  32. STDMETHODIMP CUPnPDeviceFolder::GetCurFolder(
  33. LPITEMIDLIST *ppidl)
  34. {
  35. HRESULT hr = NOERROR;
  36. TraceTag(ttidShellFolderIface, "OBJ: CCF - IPersistFolder2::GetCurFolder");
  37. *ppidl = ILClone(m_pidlFolderRoot);
  38. if (NULL == *ppidl)
  39. {
  40. hr = E_OUTOFMEMORY;
  41. goto Exit;
  42. }
  43. // NOTE: if this is being invoked remotely, we assume that IRemoteComputer
  44. // is invoked *before* IPersistFolder2.
  45. Exit:
  46. TraceHr(ttidShellFolder, FAL, hr, FALSE, "CUPnPDeviceFolder::GetCurFolder");
  47. return hr;
  48. }