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.

59 lines
1.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: I P E R S I S T F . C P P
  7. //
  8. // Contents: IPersistFolder implementation for CConnectionFolder
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 22 Sep 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "pch.h"
  16. #pragma hdrstop
  17. #include "foldinc.h" // Standard shell\folder includes
  18. #include "ncperms.h" // Permissions (policies)
  19. //+---------------------------------------------------------------------------
  20. //
  21. // Member: CConnectionFolder::Initialize
  22. //
  23. // Purpose: IPersistFolder::Initialize implementation for
  24. // CConnectionFolder
  25. //
  26. // Arguments:
  27. // pidl []
  28. //
  29. // Returns:
  30. //
  31. // Author: jeffspr 22 Sep 1997
  32. //
  33. // Notes:
  34. //
  35. STDMETHODIMP CConnectionFolder::Initialize(
  36. LPCITEMIDLIST pidl)
  37. {
  38. HRESULT hr = S_OK;
  39. TraceFileFunc(ttidShellFolderIface);
  40. // Store the pidl for the relative position in the namespace. We'll
  41. // use this later to generate absolute pidls
  42. //
  43. hr = m_pidlFolderRoot.InitializeFromItemIDList(pidl);
  44. // This should always be valid
  45. //
  46. AssertSz(!m_pidlFolderRoot.empty(), "Hey, we should have a valid folder pidl");
  47. return hr;
  48. }