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.

69 lines
1.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: P I D L U T I L . H
  7. //
  8. // Contents: Various PIDL utilities
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 1 Oct 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. // This avoids duplicate definitions with Shell PIDL functions
  17. // and MUST BE DEFINED!
  18. #define AVOID_NET_CONFIG_DUPLICATES
  19. // #include <windows.h>
  20. // #include <shlobj.h>
  21. // These functions are so trivial & get called so often they should be inlined
  22. // for ship.
  23. //
  24. #if DBG
  25. LPITEMIDLIST ILNext(LPCITEMIDLIST pidl);
  26. BOOL ILIsEmpty(LPCITEMIDLIST pidl);
  27. #else
  28. #define ILNext(pidl) ((LPITEMIDLIST) ((BYTE *)pidl + ((LPITEMIDLIST)pidl)->mkid.cb))
  29. #define ILIsEmpty(pidl) (!pidl || !((LPITEMIDLIST)pidl)->mkid.cb)
  30. #endif
  31. //LPITEMIDLIST ILGetNext(LPCITEMIDLIST pidl);
  32. //UINT ILGetSize(LPCITEMIDLIST pidl);
  33. LPITEMIDLIST ILCreate(DWORD dwSize);
  34. VOID FreeIDL(LPITEMIDLIST pidl);
  35. int ILCompare(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  36. BOOL ILIsSingleID(LPCITEMIDLIST pidl);
  37. UINT ILGetCID(LPCITEMIDLIST pidl);
  38. UINT ILGetSizeCID(LPCITEMIDLIST pidl, UINT cid);
  39. LPITEMIDLIST CloneIDLFirstCID(LPCITEMIDLIST pidl, UINT cid);
  40. LPITEMIDLIST ILSkipCID(LPCITEMIDLIST pid, UINT cid);
  41. BOOL ILIsDesktopID(LPCITEMIDLIST pidl);
  42. //LPITEMIDLIST ILFindLastID(LPCITEMIDLIST pidl);
  43. //LPITEMIDLIST ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  44. BOOL ILIsEqual(LPITEMIDLIST pidl1, LPITEMIDLIST pidl2);
  45. //BOOL ILRemoveLastID(LPITEMIDLIST pidl);
  46. LPITEMIDLIST CloneIDL(LPCITEMIDLIST pidl);
  47. #ifdef PCONFOLDENTRY_DEFINED
  48. HRESULT HrCloneRgIDL(
  49. const PCONFOLDPIDLVEC& rgpidl,
  50. BOOL fFromCache,
  51. BOOL fAllowNonCacheItems,
  52. PCONFOLDPIDLVEC& ppidl);
  53. #endif
  54. VOID FreeRgIDL(
  55. UINT cidl,
  56. LPITEMIDLIST * apidl);